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 Object
An entry in the settings file. It consists of a key/value pair and a comment that explains the entry.
  • 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 file
      defaultValue - the default value if the key is missing from the settings file
      comment - the comment to add to the settings file or null if unknown
  • Method Details

    • getKey

      @NotNull public @NotNull 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 String getComment()
      Returns the command to add to the settings file.
      Returns:
      the comment or null if unknown