Class OperatorField<V>
java.lang.Object
studio.mevera.imperat.selector.field.AbstractField<V>
studio.mevera.imperat.selector.field.operators.OperatorField<V>
- Type Parameters:
V- The type of the value that this field handles.
- All Implemented Interfaces:
SelectionField<V>
- Direct Known Subclasses:
LimitOperatorField
OperatorField is an abstract base class that extends AbstractField.
It is designed to add additional operational functionality to the field it wraps.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<SelectionField<?>>static final Set<OperatorField<?>>static final OperatorField<Integer>static final OperatorField<SortOption>Fields inherited from class studio.mevera.imperat.selector.field.AbstractField
name, suggestions, typeFields inherited from interface studio.mevera.imperat.selector.field.SelectionField
SEPARATOR, VALUE_EQUALS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOperatorField(String name, studio.mevera.imperat.util.TypeWrap<V> type) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidPerforms an operation on the specified value and a list of entities.abstract VparseFieldValue(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.Methods inherited from class studio.mevera.imperat.selector.field.AbstractField
getName, getSuggestions, getValueType
-
Field Details
-
SORT
-
LIMIT
-
ALL_OPERATORS
-
ALL
-
-
Constructor Details
-
OperatorField
-
-
Method Details
-
parseFieldValue
public abstract 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.- Specified by:
parseFieldValuein interfaceSelectionField<V>- Parameters:
value- the string representation of the value to be parsedcontext-- Returns:
- the parsed value of the field's type
- Throws:
studio.mevera.imperat.exception.CommandException- if the parsing fails
-
operate
Performs an operation on the specified value and a list of entities.- Parameters:
value- the value to be operated onentities- the list of entities to be processed
-