Package studio.mevera.imperat.context
Interface FlagData<S extends Source>
- All Known Implementing Classes:
FlagData.FlagDataImpl
Represents a flag that has been parsed/read/loaded from a
context of a command entered by the
Source
A flag has merely 2 types: 1) A true flag is a flag that has an input value next to it in the raw input 2) A switch (flag that it's value input is represented by its mere presence
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanacceptsInput(String input) aliases()create(String name, List<String> alias, ParameterType<S, T> inputType) create(String name, List<String> alias, ParameterType<S, T> inputType, boolean free) createSwitch(String name, List<String> aliases) default Stringformat()default boolean<T> @Nullable ParameterType<S,T> booleanisFree()default booleanisSwitch()@NotNull Stringname()The main name of the flag
-
Method Details
-
create
-
create
-
createSwitch
-
name
The main name of the flag- Returns:
- the name(unique) of the flag
-
aliases
- Returns:
- the alias of the flag
-
isFree
boolean isFree()- Returns:
- whether the flag is free
-
inputType
- Returns:
- the valueType of input from the flag
-
hasAlias
-
format
-
acceptsInput
-
isSwitch
default boolean isSwitch()
-