Class AbstractRioSetting<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T defaultValue
      The default value for this setting.
      private java.lang.String description
      A human-readable description for this setting
      private java.lang.String key
      A unique key for this setting.
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractRioSetting​(java.lang.String key, java.lang.String description, T defaultValue)
      Create a new setting object that will be used to reference the given setting.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      T getDefaultValue()
      Returns the default value for this parser setting if it is not set by a user.
      java.lang.String getDescription()
      The human readable name for this parser setting
      java.lang.String getKey()
      A unique key for this parser setting.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • key

        private final java.lang.String key
        A unique key for this setting.
      • description

        private final java.lang.String description
        A human-readable description for this setting
      • defaultValue

        private final T defaultValue
        The default value for this setting.
        NOTE: This value must be immutable.
    • Constructor Detail

      • AbstractRioSetting

        protected AbstractRioSetting​(java.lang.String key,
                                     java.lang.String description,
                                     T defaultValue)
        Create a new setting object that will be used to reference the given setting.
        Parameters:
        key - A unique key to use for this setting.
        description - A short human-readable description for this setting.
        defaultValue - An immutable value specifying the default for this setting. This can be optionally be overridden by a system property with a name equal to the setting's unique key.
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Description copied from interface: RioSetting
        A unique key for this parser setting.
        Specified by:
        getKey in interface RioSetting<T>
        Returns:
        A unique key identifying this parser setting.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: RioSetting
        The human readable name for this parser setting
        Specified by:
        getDescription in interface RioSetting<T>
        Returns:
        The name for this parser setting.
      • getDefaultValue

        public T getDefaultValue()
        Description copied from interface: RioSetting
        Returns the default value for this parser setting if it is not set by a user.
        Specified by:
        getDefaultValue in interface RioSetting<T>
        Returns:
        The default value for this parser setting.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object