Class Field

java.lang.Object
br.net.dd.netherwingcore.common.configuration.fields.Field
Direct Known Subclasses:
DefaultValue, Description, Detail, DeveloperNote, Example, Format, ImportantNote, Key, Observations, Value

public abstract class Field extends Object
Abstract class representing a generic field configuration. This class serves as a base for creating fields with different values and types. It provides mechanisms to manage single or multiple values and handles field types.
  • Constructor Details

    • Field

      public Field(String... values)
      Constructor to initialize the field with multiple values.
      Parameters:
      values - An array of strings representing the field's multiple values.
    • Field

      public Field(String value, Type type)
      Constructor to initialize the field with a single value and its type.
      Parameters:
      value - The single value assigned to the field.
      type - The type of the field.
  • Method Details

    • getValues

      public String[] getValues()
      Retrieves the values of the field.
      Returns:
      An array of strings representing the field's values.
    • setValues

      public void setValues(String[] values)
      Sets the values of the field.
      Parameters:
      values - An array of strings representing the new values for the field.
    • getValue

      public String getValue()
      Retrieves the single value of the field.
      Returns:
      The string value of the field.
    • setValue

      public void setValue(String value)
      Sets the single value of the field.
      Parameters:
      value - The new string value to be assigned to the field.
    • getType

      public Type getType()
      Retrieves the type of the field.
      Returns:
      The Type of the field.
    • setType

      public void setType(Type type)
      Sets the type of the field.
      Parameters:
      type - The new Type to be assigned to the field.