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

    Fields
    Modifier and Type
    Field
    Description
    static final Set<SelectionField<?>>
     
    static final char
     
    static final char
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the name of the selection field.
    Retrieves a list of suggestions related to this selection field's value
    Retrieves 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

  • 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 parsed
      context - 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

      List<String> getSuggestions()
      Retrieves a list of suggestions related to this selection field's value
      Returns:
      A list of suggestion strings.