org.eclipse.rdf4j.console.setting

## 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 Summary

    Constructors
    Constructor and Description
    `ConsoleSetting(T initValue)` Constructor

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clear setting
    `T` | `get()` Get the current value for this setting
    `String` | `getAsString()` Get the value for this setting as a string
    `String` | `getHelpLong()` Get long description
    `String` | `getHelpShort()` Get short description, small enough to fit on one console row
    `T` | `getInitValue()` Get the initial value
    `Class` | `getType()` Get the parameter type
    `void` | `set(T value)` Set the value for this setting
    `abstract void` | `setFromString(String value)` Set the value for this setting from a string

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.console.Help

      `getName`

- - ### Constructor Detail

    - #### ConsoleSetting

          public ConsoleSetting(T initValue)

      Constructor
      Parameters:
        `initValue` - initial value

  - ### Method Detail

    - #### 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>`

    - #### 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

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.