Class ShipIdentifiableArgument<T extends org.core.utils.Identifiable>

java.lang.Object
org.ships.commands.argument.arguments.identifiable.ShipIdentifiableArgument<T>
All Implemented Interfaces:
org.core.command.argument.CommandArgument<T>, org.core.command.argument.ParseCommandArgument<T>, org.core.command.argument.SuggestCommandArgument<T>
Direct Known Subclasses:
CrewPermissionArgument

public class ShipIdentifiableArgument<T extends org.core.utils.Identifiable> extends Object implements org.core.command.argument.CommandArgument<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ShipIdentifiableArgument(String id, Class<T> type, org.core.utils.lamda.tri.TriPredicate<? super org.core.command.argument.context.CommandContext,? super org.core.command.argument.context.CommandArgumentContext<T>,? super T> predicate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.core.command.argument.CommandArgumentResult<T>
    parse(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<T> argument)
     
    suggest(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<T> argument)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.core.command.argument.CommandArgument

    getUsage

    Methods inherited from interface org.core.command.argument.SuggestCommandArgument

    errorMessage
  • Constructor Details

    • ShipIdentifiableArgument

      public ShipIdentifiableArgument(String id, Class<T> type)
    • ShipIdentifiableArgument

      public ShipIdentifiableArgument(String id, Class<T> type, org.core.utils.lamda.tri.TriPredicate<? super org.core.command.argument.context.CommandContext,? super org.core.command.argument.context.CommandArgumentContext<T>,? super T> predicate)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.core.command.argument.CommandArgument<T extends org.core.utils.Identifiable>
    • parse

      public org.core.command.argument.CommandArgumentResult<T> parse(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<T> argument) throws IOException
      Specified by:
      parse in interface org.core.command.argument.ParseCommandArgument<T extends org.core.utils.Identifiable>
      Throws:
      IOException
    • suggest

      public List<String> suggest(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<T> argument)
      Specified by:
      suggest in interface org.core.command.argument.SuggestCommandArgument<T extends org.core.utils.Identifiable>