Class AbstractArgument<T>
java.lang.Object
net.lucypoulton.squirtgun.command.argument.AbstractArgument<T>
- All Implemented Interfaces:
CommandArgument<T>
- Direct Known Subclasses:
GreedyStringArgument,ListArgument,OnlinePlayerArgument,SingleWordArgument,SubcommandNodeArgument
An abstract argument, encapsulating the name and description fields.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractArgument(String name, String description, boolean isOptional) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.lucypoulton.squirtgun.command.argument.CommandArgument
getValue, tabComplete
-
Constructor Details
-
AbstractArgument
- Parameters:
name- the argument's namedescription- the argument's description
-
-
Method Details
-
getName
Description copied from interface:CommandArgumentGets this argument's name.- Specified by:
getNamein interfaceCommandArgument<T>- Returns:
- the name
-
getDescription
Description copied from interface:CommandArgumentGets this argument's description for use in help commands. This should be a simple, one-line sentence.- Specified by:
getDescriptionin interfaceCommandArgument<T>- Returns:
- the description
-
isOptional
public boolean isOptional()Description copied from interface:CommandArgumentGets whether this argument is optional or not. This should not change how the argument behaves.- Specified by:
isOptionalin interfaceCommandArgument<T>
-
toString
-