public class Options extends Object
Betwixt
optional behaviour hints.
An option links a name with a value (both strings).Constructor and Description |
---|
Options() |
Modifier and Type | Method and Description |
---|---|
void |
addOption(String name,
String value)
Adds the option.
|
void |
addOptions(Options options)
Adds multiple options from an existing
Options collection. |
String[] |
getNames()
Gets the names of each option.
|
String |
getValue(String name)
Gets the value (if any) associated with the given name.
|
public String getValue(String name)
name
- String
, not nullpublic String[] getNames()
String
array containing the name of each optionpublic void addOption(String name, 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
collectionCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.