public enum RelativeFile extends java.lang.Enum<RelativeFile> implements IDatatypePost<java.io.File,java.io.File>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
java.io.File |
apply(IDatatypeContext ctx,
java.io.File original)
Takes the expected input and transforms it based on the value held by
original . |
static java.io.File |
gameDir() |
static java.util.stream.Stream<java.lang.String> |
tabComplete(IArgConsumer consumer,
java.io.File base0) |
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 RelativeFile |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RelativeFile[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RelativeFile INSTANCE
public static RelativeFile[] values()
for (RelativeFile c : RelativeFile.values()) System.out.println(c);
public static RelativeFile 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 java.io.File apply(IDatatypeContext ctx, java.io.File original) throws CommandException
IDatatypePost
original
. If original
is null, it is expected that the implementation of this method has a case to handle it, such that a
NullPointerException
will never be thrown as a result.apply
in interface IDatatypePost<java.io.File,java.io.File>
ctx
- The datatype contextoriginal
- The transformable valueCommandException
public java.util.stream.Stream<java.lang.String> tabComplete(IDatatypeContext ctx)
IDatatype
IArgConsumer
} provided by
IDatatypeContext.getConsumer()
in order to aide the user in executing commands.
One benefit over datatypes over IArgParser
s 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 IDatatype
ctx
- The argument consumer to tab completeIArgConsumer.tabCompleteDatatype(IDatatype)
public static java.util.stream.Stream<java.lang.String> tabComplete(IArgConsumer consumer, java.io.File base0) throws CommandException
CommandException
public static java.io.File gameDir()