Class SettingsEntry<T>
java.lang.Object
com.realtime.crossfire.jxclient.settings.SettingsEntry<T>
- Type Parameters:
T- the type of the values
An entry in the settings file. It consists of a key/value pair and a comment
that explains the entry.
-
Constructor Summary
ConstructorsConstructorDescriptionSettingsEntry(@NotNull String key, T defaultValue, @Nullable String comment) Creates a new instance. -
Method Summary
-
Constructor Details
-
SettingsEntry
public SettingsEntry(@NotNull @NotNull String key, @NotNull T defaultValue, @Nullable @Nullable String comment) Creates a new instance.- Parameters:
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 ornullif unknown
-
-
Method Details
-
getKey
Returns the key in the settings file.- Returns:
- the key
-
getDefaultValue
Returns the default value if the key is missing from the settings file.- Returns:
- the default value
-
getComment
Returns the command to add to the settings file.- Returns:
- the comment or
nullif unknown
-