Class DefaultLanguageOption<T>

java.lang.Object
de.jplag.options.DefaultLanguageOption<T>
Type Parameters:
T - The type of the option
All Implemented Interfaces:
LanguageOption<T>

public class DefaultLanguageOption<T> extends Object implements LanguageOption<T>
Default implementation for LanguageOption
  • Method Details

    • getType

      public OptionType<T> getType()
      Specified by:
      getType in interface LanguageOption<T>
      Returns:
      The type instance for the option.
    • getName

      public String getName()
      Specified by:
      getName in interface LanguageOption<T>
      Returns:
      The name of the option.
    • getValue

      public T getValue()
      Specified by:
      getValue in interface LanguageOption<T>
      Returns:
      The value of the option.
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface LanguageOption<T>
      Returns:
      The description of the option.
    • setValue

      public void setValue(T value)
      Description copied from interface: LanguageOption
      Updates the options value.
      Specified by:
      setValue in interface LanguageOption<T>
      Parameters:
      value - The new value
    • hasValue

      public boolean hasValue()
      Specified by:
      hasValue in interface LanguageOption<T>
      Returns:
      True, if the option has a value right now. The actual value might still be null.