Interface RioSetting<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default T convert​(java.lang.String stringRepresentation)
      Attempts to convert from a string to a type-safe representation based on the generic type of this setting.
      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.
    • Method Detail

      • getKey

        java.lang.String getKey()
        A unique key for this parser setting.
        Returns:
        A unique key identifying this parser setting.
      • getDescription

        java.lang.String getDescription()
        The human readable name for this parser setting
        Returns:
        The name for this parser setting.
      • getDefaultValue

        T getDefaultValue()
        Returns the default value for this parser setting if it is not set by a user.
        Returns:
        The default value for this parser setting.
      • convert

        default T convert​(java.lang.String stringRepresentation)
        Attempts to convert from a string to a type-safe representation based on the generic type of this setting.
        Parameters:
        stringRepresentation - a string representation of a value for this setting.
        Returns:
        The corresponding object of type T for the supplied string value.
        Throws:
        RioConfigurationException - if the setting type does not provide conversion from a string to the expected type.