T - The type of the valuepublic interface Argument<T>
selector. An Argument is one or
more key-to-value mappings (key=value) with the key represented by an
ArgumentType.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Argument.Invertible<T>
Represents an
Argument which can be inverted to select all
targets not matching the filter. |
| Modifier and Type | Method and Description |
|---|---|
static <T> Argument.Invertible<T> |
create(ArgumentType.Invertible<T> type,
T value,
boolean inverted)
Creates a new
Argument.Invertible using the specified type and
value. |
static <T> Argument<T> |
create(ArgumentType<T> type,
T value)
Creates a new
Argument using the specified type and value. |
static <T,V> Set<Argument<T>> |
createSet(ArgumentHolder<? extends ArgumentType<T>> type,
V value)
Creates a new set of
Arguments using the specified type and
value. |
ArgumentType<T> |
getType()
Returns the type of this
Argument. |
T |
getValue()
Returns the value of this
Argument. |
static Argument<?> |
parse(String argument)
Parses an
Argument from the given argument string. |
String |
toPlain()
Converts this
Argument to a valid argument string. |
static <T> Argument<T> create(ArgumentType<T> type, T value)
Argument using the specified type and value.
If the type is invertible, the Argument will not be
inverted.
T - The type of the argument valuetype - The type of the argumentvalue - The value of the argumentstatic <T> Argument.Invertible<T> create(ArgumentType.Invertible<T> type, T value, boolean inverted)
Argument.Invertible using the specified type and
value. The created Argument will be inverted based on the given
parameter.T - The type of the argument valuetype - The type of the invertible argumentvalue - The value of the invertible argumentinverted - true if the argument should be invertedstatic <T,V> Set<Argument<T>> createSet(ArgumentHolder<? extends ArgumentType<T>> type, V value)
Arguments using the specified type and
value.T - The type of the arguments' joined valueV - The type of the arguments' sub-valuestype - The type of the argumentsvalue - The value of the argumentsstatic Argument<?> parse(String argument) throws IllegalArgumentException
Argument from the given argument string.
In Vanilla, it should be formatted like key=value.
argument - The argument stringIllegalArgumentException - If the argument couldn't be parsed (e.g.
due to invalid format)ArgumentType<T> getType()
Argument.