Class SettingsEntry<T>
- java.lang.Object
-
- com.realtime.crossfire.jxclient.settings.SettingsEntry<T>
-
- Type Parameters:
T- the type of the values
public class SettingsEntry<T> extends java.lang.ObjectAn entry in the settings file. It consists of a key/value pair and a comment that explains the entry.
-
-
Constructor Summary
Constructors Constructor Description SettingsEntry(@NotNull java.lang.String key, T defaultValue, @Nullable java.lang.String comment)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetComment()Returns the command to add to the settings file.TgetDefaultValue()Returns the default value if the key is missing from the settings file.@NotNull java.lang.StringgetKey()Returns the key in the settings file.
-
-
-
Constructor Detail
-
SettingsEntry
public SettingsEntry(@NotNull @NotNull java.lang.String key, @NotNull T defaultValue, @Nullable @Nullable java.lang.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 Detail
-
getKey
@NotNull public @NotNull java.lang.String getKey()
Returns the key in the settings file.- Returns:
- the key
-
getDefaultValue
@NotNull public T getDefaultValue()
Returns the default value if the key is missing from the settings file.- Returns:
- the default value
-
getComment
@Nullable public @Nullable java.lang.String getComment()
Returns the command to add to the settings file.- Returns:
- the comment or
nullif unknown
-
-