Class Key

java.lang.Object
br.net.dd.netherwingcore.common.configuration.fields.Field
br.net.dd.netherwingcore.common.configuration.fields.Key

public class Key extends Field
The Key class represents a specific type of Field, which is used to handle configuration fields. This class is responsible for encapsulating values where the first value is considered the key.

It extends the functionality of the Field class by providing direct access to the first value supplied during instantiation through the getValue() method.

Usage

Key key = new Key("myKey", "otherValue");
String value = key.getValue(); // Returns "myKey"
See Also:
  • Constructor Details

    • Key

      public Key(String... values)
      Constructs a new Key instance with the provided values.
      Parameters:
      values - The values associated with this Key. The first value is treated as the key.
  • Method Details

    • getValue

      public String getValue()
      Retrieves the first value of this field, which is treated as the key.
      Overrides:
      getValue in class Field
      Returns:
      The first value of the Key.