Class ATXSetting<T>

    • Field Detail

      • value

        protected T value
        The current value of the setting as generic type.
    • Constructor Detail

      • ATXSetting

        public ATXSetting​(String name,
                          ATXSetting.SettingsGroup group,
                          T value)
        Instantiates a new ATXSetting. Settings group, descriptions and default value are synchronized during plugin startup.
        Parameters:
        name - the name
        group - the settings group
        value - the current value
      • ATXSetting

        public ATXSetting​(String name,
                          ATXSetting.SettingsGroup group,
                          String descGerman,
                          String descEnglish,
                          T defaultValue)
        Instantiates a new ATXSetting with associated group, descriptions and default value.
        Parameters:
        name - the name
        group - the settings group
        descGerman - the German description
        descEnglish - the English description
        defaultValue - the default value
    • Method Detail

      • readResolve

        protected Object readResolve()
        Used for backward compatibility using deprecated configuration map.
        Returns:
        the value to use after deserialization
        Since:
        2.7.0
      • getName

        public String getName()
      • getTitle

        public String getTitle()
      • getDescGerman

        public String getDescGerman()
      • getDescEnglish

        public String getDescEnglish()
      • getDescription

        public String getDescription()
        The system locale description, defaults to English.
        Returns:
        the description
      • getDefaultValue

        public T getDefaultValue()
      • getValue

        public T getValue()
      • setValue

        public void setValue​(T value)
        Sets the current value.
        Parameters:
        value - the new current value
      • isCheckbox

        public boolean isCheckbox()
        Determines whether this setting is checkbox type.
        Returns:
        true if setting is checkbox type, false otherwise
      • isSecret

        public boolean isSecret()
        Determines whether this setting is secret type.
        Returns:
        true if setting is secret type, false otherwise
      • toString

        public static String toString​(boolean value)
        Converts a boolean value to Python string equivalent.
        Parameters:
        value - the value
        Returns:
        the string value