Class ConsoleSetting<T>
- java.lang.Object
-
- org.eclipse.rdf4j.console.setting.ConsoleSetting<T>
-
- Type Parameters:
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 Description ConsoleSetting(T initValue)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()Clear settingTget()Get the current value for this settingStringgetAsString()Get the value for this setting as a stringStringgetHelpLong()Get long descriptionStringgetHelpShort()Get short description, small enough to fit on one console rowTgetInitValue()Get the initial valueClassgetType()Get the parameter typevoidset(T value)Set the value for this settingabstract voidsetFromString(String value)Set the value for this setting from a string
-
-
-
Constructor Detail
-
ConsoleSetting
public ConsoleSetting(T initValue)
Constructor- Parameters:
initValue- initial value
-
-
Method Detail
-
getInitValue
public T getInitValue()
Description copied from interface:SettingGet the initial value- Specified by:
getInitValuein interfaceSetting<T>- Returns:
- T
-
get
public T get()
Description copied from interface:SettingGet the current value for this setting
-
set
public void set(T value)
Description copied from interface:SettingSet the value for this setting
-
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:SettingClear setting
-
getHelpShort
public String getHelpShort()
Get short description, small enough to fit on one console row- Specified by:
getHelpShortin interfaceHelp- Returns:
- help string
-
getHelpLong
public String getHelpLong()
Get long description- Specified by:
getHelpLongin interfaceHelp- Returns:
- string, can be multiple lines
-
-