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 void
clear()
Clear settingT
get()
Get the current value for this settingString
getAsString()
Get the value for this setting as a stringString
getHelpLong()
Get long descriptionString
getHelpShort()
Get short description, small enough to fit on one console rowT
getInitValue()
Get the initial valueClass
getType()
Get the parameter typevoid
set(T value)
Set the value for this settingabstract void
setFromString(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:Setting
Get the initial value- Specified by:
getInitValue
in interfaceSetting<T>
- Returns:
- T
-
get
public T get()
Description copied from interface:Setting
Get the current value for this setting
-
set
public void set(T value)
Description copied from interface:Setting
Set 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:Setting
Clear setting
-
getHelpShort
public String getHelpShort()
Get short description, small enough to fit on one console row- Specified by:
getHelpShort
in interfaceHelp
- Returns:
- help string
-
getHelpLong
public String getHelpLong()
Get long description- Specified by:
getHelpLong
in interfaceHelp
- Returns:
- string, can be multiple lines
-
-