java.lang.Object
com.djrapitops.plan.settings.config.paths.key.Setting<T>
Direct Known Subclasses:
BooleanSetting, IntegerSetting, StringListSetting, StringSetting, TimeSetting

public abstract class Setting<T> extends Object
Represents a path to a config value.
  • Field Details

    • path

      protected final String path
  • Constructor Details

  • Method Details

    • nullValidator

      public static <T> boolean nullValidator(T value)
    • timeValidator

      public static boolean timeValidator(Number number)
    • getPath

      public String getPath()
      Used to get the String path of a the config setting.

      Path separates nested levels with a dot.

      Returns:
      Example: Settings.WebServer.Enabled
    • getValueFrom

      public abstract T getValueFrom(ConfigNode node)
    • isValid

      public boolean isValid(T value)
    • isInvalid

      public boolean isInvalid(T value)
    • getDefaultValue

      public T getDefaultValue()
    • toString

      public String toString()
      Overrides:
      toString in class Object