public enum ForBlockOptionalMeta extends java.lang.Enum<ForBlockOptionalMeta> implements IDatatypeFor<BlockOptionalMeta>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
BlockOptionalMeta |
get(IDatatypeContext ctx)
Consumes the desired amount of arguments from the specified
IDatatypeContext, and
then returns the parsed value. |
java.util.stream.Stream<java.lang.String> |
tabComplete(IDatatypeContext ctx)
Attempts to complete missing or partial input provided through the
IArgConsumer} provided by
IDatatypeContext.getConsumer() in order to aide the user in executing commands. |
static ForBlockOptionalMeta |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ForBlockOptionalMeta[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ForBlockOptionalMeta INSTANCE
public static ForBlockOptionalMeta[] values()
for (ForBlockOptionalMeta c : ForBlockOptionalMeta.values()) System.out.println(c);
public static ForBlockOptionalMeta valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic BlockOptionalMeta get(IDatatypeContext ctx) throws CommandException
IDatatypeForIDatatypeContext, and
then returns the parsed value. This method will more than likely return a IllegalArgumentException
if the expected input does not conform to a parseable value. As far as a CommandException being
thrown is concerned, see the note below for specifics.get in interface IDatatypeFor<BlockOptionalMeta>ctx - The contextCommandException - If there was an issue parsing using another type or arguments could not be polled.IDatatypeContextpublic java.util.stream.Stream<java.lang.String> tabComplete(IDatatypeContext ctx)
IDatatypeIArgConsumer} provided by
IDatatypeContext.getConsumer() in order to aide the user in executing commands.
One benefit over datatypes over IArgParsers is that instead of each command trying to guess what values
the datatype will accept, or simply not tab completing at all, datatypes that support tab completion can provide
accurate information using the same methods used to parse arguments in the first place.
tabComplete in interface IDatatypectx - The argument consumer to tab completeIArgConsumer.tabCompleteDatatype(IDatatype)