| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Option> |
optionsMap |
| Constructor and Description |
|---|
OptionsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOption(Option option) |
Boolean |
getBoolean(String name,
String attribute)
|
<E extends Enum<E>> |
getEnum(String name,
String attribute,
Class<E> type)
|
Integer |
getInteger(String name,
String attribute)
|
Option |
getOption(String name)
Returns the
Option with the given name, if present. |
Set<String> |
getOptionNames()
Returns the names of all available
Options |
String |
getOptionValue(String optionName,
String attributeName)
Returns the attribute with the given name for the
Option with the given name. |
String |
getString(String name,
String attribute)
Returns the attribute with the given name for the
Option with the given name. |
boolean |
hasOption(String name)
Checks whether there is an
Option with the given name. |
String |
toString() |
public void addOption(Option option)
public Option getOption(String name)
OptionsOption with the given name, if present.public boolean hasOption(String name)
OptionsOption with the given name.public Set<String> getOptionNames()
OptionsOptionsgetOptionNames in interface OptionsOptionspublic String getOptionValue(String optionName, String attributeName)
OptionsOption with the given name.getOptionValue in interface OptionsoptionName - the name of the Option to get the attribute fromattributeName - the name of the attribute of the Optionnull if either the Option or the attribute does not
existpublic String getString(String name, String attribute)
OptionsOption with the given name.public Integer getInteger(String name, String attribute)
OptionsInteger parsed from the attribute with the given name for the Option with the given
name.getInteger in interface Optionsname - the name of the Option to get the attribute fromattribute - the name of the attribute of the Optionnull if either the Option or the attribute does not exist or the or
the value can not be parsed to an integerpublic Boolean getBoolean(String name, String attribute)
OptionsgetBoolean in interface Optionsname - the name of the Option to get the attribute fromattribute - the name of the attribute of the OptionBoolean.TRUE if the value of the attribute equals to (ignoring case) true,
Boolean.FALSE otherwise (also if no such Option exists)public <E extends Enum<E>> E getEnum(String name, String attribute, Class<E> type)
OptionsEnum constant of the given type represented by the attribute with the given name for the
Option with the given name.getEnum in interface Optionsname - the name of the Option to get the attribute fromattribute - the name of the attribute of the Optionnull otherwise (also if no such Option exists)Copyright © 2011–2023 aiticon GmbH. All rights reserved.