Class ShipIdArgument<V extends Vessel>

java.lang.Object
org.ships.commands.argument.arguments.ShipIdArgument<V>
All Implemented Interfaces:
org.core.command.argument.CommandArgument<V>, org.core.command.argument.ParseCommandArgument<V>, org.core.command.argument.SuggestCommandArgument<V>

public class ShipIdArgument<V extends Vessel> extends Object implements org.core.command.argument.CommandArgument<V>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ShipIdArgument(String id, BiPredicate<? super org.core.source.command.CommandSource,? super Vessel> predicate, Function<? super Vessel,String> failMessage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.core.command.argument.CommandArgumentResult<V>
    parse(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<V> argument)
     
    suggest(org.core.command.argument.context.CommandContext commandContext, org.core.command.argument.context.CommandArgumentContext<V> 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

  • Method Details

    • getId

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

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

      public Set<String> suggest(org.core.command.argument.context.CommandContext commandContext, org.core.command.argument.context.CommandArgumentContext<V> argument)
      Specified by:
      suggest in interface org.core.command.argument.SuggestCommandArgument<V extends Vessel>