T
- the type of the valuespublic class SettingsEntry<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
comment
The comment to add to the settings file.
|
private T |
defaultValue
The default value if the key is missing from the settings file.
|
private java.lang.String |
key
The key in the settings file.
|
Constructor and Description |
---|
SettingsEntry(java.lang.String key,
T defaultValue,
java.lang.String comment)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComment()
Returns the command to add to the settings file.
|
T |
getDefaultValue()
Returns the default value if the key is missing from the settings file.
|
java.lang.String |
getKey()
Returns the key in the settings file.
|
@Nullable private final java.lang.String comment
null
if unknown.@NotNull private final T defaultValue
@NotNull private final java.lang.String key
public SettingsEntry(@NotNull java.lang.String key, @NotNull T defaultValue, @Nullable java.lang.String comment)
key
- the key in the settings filedefaultValue
- the default value if the key is missing from the
settings filecomment
- the comment to add to the settings file or null
if
unknown@Nullable public java.lang.String getComment()
null
if unknown@NotNull public T getDefaultValue()
@NotNull public java.lang.String getKey()