| Constructor and Description |
|---|
OptionImpl(String name) |
OptionImpl(String name,
Map<String,String> map) |
| Modifier and Type | Method and Description |
|---|---|
OptionImpl |
addAttribute(String name,
String value) |
OptionImpl |
addMap(Map<String,String> map) |
boolean |
containsAttribute(String name)
Checks whether this option has an attribute with the given name.
|
String |
getAttribute(String name)
Returns the attribute with the given name, if present.
|
int |
getAttributeAsInteger(String name) |
Map<String,String> |
getAttributeMap() |
Set<String> |
getAttributeNames()
Returns the names of all attributes of this option
|
Boolean |
getBoolean(String name)
Returns a
Boolean parsed from the attribute with the given name. |
<E extends Enum<E>> |
getEnum(String name,
Class<E> type)
Returns the
Enum constant represented by the attribute with the given name. |
Integer |
getInteger(String name)
Returns an
Integer parsed from the attribute with the given name. |
String |
getName()
Returns the name of this option.
|
String |
getString(String name)
Returns the attribute with the given name, if present.
|
String |
toString() |
public OptionImpl(String name)
public String getName()
Optionpublic OptionImpl addMap(Map<String,String> map)
public OptionImpl addAttribute(String name, String value)
public boolean containsAttribute(String name)
OptioncontainsAttribute in interface Optionname - the name of the attribute to checktrue if this option contains an attribute with the given name, false otherwisepublic String getAttribute(String name)
OptiongetAttribute in interface Optionname - the name of the attribute to getnull otherwisepublic int getAttributeAsInteger(String name)
public Set<String> getAttributeNames()
OptiongetAttributeNames in interface Optionpublic String getString(String name)
Optionpublic Integer getInteger(String name)
OptionInteger parsed from the attribute with the given name.getInteger in interface Optionname - the name of the attribute to getnull if no such attribute exists (or the value can not be parsed to an
integer)public Boolean getBoolean(String name)
OptionBoolean parsed from the attribute with the given name.getBoolean in interface Optionname - the name of the attribute to getBoolean.TRUE if the value of the attribute equals to (ignoring case) true,
Boolean.FALSE otherwisepublic <E extends Enum<E>> E getEnum(String name, Class<E> type)
OptionEnum constant represented by the attribute with the given name.Copyright © 2011–2019 aiticon GmbH. All rights reserved.