public abstract class Setting<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
path |
Constructor and Description |
---|
Setting(java.lang.String path,
java.lang.Class<T> type) |
Setting(java.lang.String path,
java.lang.Class<T> type,
java.util.function.Predicate<T> validator) |
Setting(java.lang.String path,
Type<T> type) |
Setting(java.lang.String path,
Type<T> type,
java.util.function.Predicate<T> validator) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPath()
Used to get the String path of a the config setting.
|
abstract T |
getValueFrom(ConfigNode node) |
boolean |
isValid(T value) |
static <T> boolean |
nullValidator(T value) |
static boolean |
timeValidator(java.lang.Number number) |
java.lang.String |
toString() |
public Setting(java.lang.String path, java.lang.Class<T> type)
public Setting(java.lang.String path, java.lang.Class<T> type, java.util.function.Predicate<T> validator)
public static <T> boolean nullValidator(T value)
public static boolean timeValidator(java.lang.Number number)
public java.lang.String getPath()
Path separates nested levels with a dot.
public abstract T getValueFrom(ConfigNode node)
public boolean isValid(T value)
public java.lang.String toString()
toString
in class java.lang.Object