public static interface Command.Condition
Modifier and Type | Field and Description |
---|---|
static Command.Condition |
FALSE
An condition that always returns false.
|
static Command.Condition |
TRUE
An condition that always returns true.
|
Modifier and Type | Method and Description |
---|---|
default Command.Condition |
and(Command.Condition other) |
default <T extends Command.Condition> |
as(java.lang.Class<T> type)
Retrieve this condition as a more specific type, if possible.
|
default Command.Condition |
not() |
default Command.Condition |
or(Command.Condition other) |
boolean |
satisfied(InjectedValueAccess context)
Determine if the condition is satisfied.
|
static final Command.Condition TRUE
static final Command.Condition FALSE
boolean satisfied(InjectedValueAccess context)
context
- the command contextdefault Command.Condition and(Command.Condition other)
default Command.Condition or(Command.Condition other)
default Command.Condition not()
default <T extends Command.Condition> java.util.Optional<T> as(java.lang.Class<T> type)
T
- the type of the outputtype
- the class to cast toT
, if possible