|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.Options
public class Options
Collective for Betwixt
optional behaviour hints.
An option links a name with a value (both strings).
Constructor Summary | |
---|---|
Options()
|
Method Summary | |
---|---|
void |
addOption(java.lang.String name,
java.lang.String value)
Adds the option. |
void |
addOptions(Options options)
Adds multiple options from an existing Options collection. |
java.lang.String[] |
getNames()
Gets the names of each option. |
java.lang.String |
getValue(java.lang.String name)
Gets the value (if any) associated with the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Options()
Method Detail |
---|
public java.lang.String getValue(java.lang.String name)
name
- String
, not null
public java.lang.String[] getNames()
String
array containing the name of each optionpublic void addOption(java.lang.String name, java.lang.String value)
name
- String
name, not nullvalue
- Strong
name, not nullpublic void addOptions(Options options)
Options
collection.
The rule with options is that the most recently set value for an option
wins, so options are potentially overwritten by this call.
options
- -
an existing Options
collection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |