Interface SelectionField<V>
- Type Parameters:
V- The type of the value that the selection field handles.
- All Known Implementing Classes:
AbstractField,LimitOperatorField,NumericField,OperatorField,PredicateField,RangedNumericField
public interface SelectionField<V>
The SelectionField interface defines methods for handling selection fields
with generic types. It provides functionalities to get the type of the value
and to parse a string representation into the field's value type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<SelectionField<?>>static final charstatic final char -
Method Summary
Modifier and TypeMethodDescriptiongetName()Retrieves the name of the selection field.Retrieves a list of suggestions related to this selection field's valueRetrieves the type of the value handled by the selection field.parseFieldValue(String value, studio.mevera.imperat.context.CommandContext<BukkitCommandSource> context) Parses the given string representation of the value and converts it into the field's value type.
-
Field Details
-
VALUE_EQUALS
static final char VALUE_EQUALS- See Also:
-
SEPARATOR
static final char SEPARATOR- See Also:
-
ALL
-
-
Method Details
-
getName
String getName()Retrieves the name of the selection field.- Returns:
- The name of the selection field.
-
getValueType
Type getValueType()Retrieves the type of the value handled by the selection field.- Returns:
- The type information wrapped in a TypeWrap object, which represents the value type of the selection field.
-
parseFieldValue
V parseFieldValue(String value, studio.mevera.imperat.context.CommandContext<BukkitCommandSource> context) throws studio.mevera.imperat.exception.CommandException Parses the given string representation of the value and converts it into the field's value type.- Parameters:
value- the string representation of the value to be parsedcontext- the context for this execution- Returns:
- the parsed value of the field's type
- Throws:
studio.mevera.imperat.exception.CommandException- if the parsing fails
-
getSuggestions
Retrieves a list of suggestions related to this selection field's value- Returns:
- A list of suggestion strings.
-