Class ConsoleSetting<T>

java.lang.Object
org.eclipse.rdf4j.console.setting.ConsoleSetting<T>
Type Parameters:
T -
All Implemented Interfaces:
Help, Setting<T>
Direct Known Subclasses:
ConsoleWidth, LogLevel, Prefixes, QueryPrefix, SaveHistory, ShowPrefix, WorkDir

public abstract class ConsoleSetting<T> extends Object implements Setting<T>, Help
Abstract setting
Author:
Bart Hanssens
  • Constructor Details

    • ConsoleSetting

      public ConsoleSetting(T initValue)
      Constructor
      Parameters:
      initValue - initial value
  • Method Details

    • getType

      public Class getType()
      Description copied from interface: Setting
      Get the parameter type
      Specified by:
      getType in interface Setting<T>
      Returns:
      class type
    • getInitValue

      public T getInitValue()
      Description copied from interface: Setting
      Get the initial value
      Specified by:
      getInitValue in interface Setting<T>
      Returns:
      T
    • get

      public T get()
      Description copied from interface: Setting
      Get the current value for this setting
      Specified by:
      get in interface Setting<T>
      Returns:
      value
    • set

      public void set(T value)
      Description copied from interface: Setting
      Set the value for this setting
      Specified by:
      set in interface Setting<T>
      Parameters:
      value -
    • setFromString

      public abstract void setFromString(String value) throws IllegalArgumentException
      Set the value for this setting from a string
      Parameters:
      value - string value
      Throws:
      IllegalArgumentException
    • getAsString

      public String getAsString()
      Get the value for this setting as a string
      Returns:
      string value
    • clear

      public void clear()
      Description copied from interface: Setting
      Clear setting
      Specified by:
      clear in interface Setting<T>
    • getHelpShort

      public String getHelpShort()
      Get short description, small enough to fit on one console row
      Specified by:
      getHelpShort in interface Help
      Returns:
      help string
    • getHelpLong

      public String getHelpLong()
      Get long description
      Specified by:
      getHelpLong in interface Help
      Returns:
      string, can be multiple lines