public class DynamicOptionClient extends Object implements Comparable
| Constructor and Description |
|---|
DynamicOptionClient(Class enclosingClass,
String... optionDefinition)
Define the set of dynamic options the client recognizes.
|
DynamicOptionClient(Class enclosingClass,
String[] otherDefinitions,
String... optionDefinition) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsOption(String option)
Determine if this client can accept this option.
|
int |
compareTo(Object o) |
Boolean |
getBoolean(String key)
Obtain the Boolean value corresponding to the key.
|
Byte |
getByte(String key)
Obtain the Byte value corresponding to the key.
|
String |
getClassname() |
String[] |
getDefaultValues() |
Double |
getDouble(String key)
Obtain the Double value corresponding to the key.
|
Float |
getFloat(String key)
Obtain the Float value corresponding to the key.
|
String[] |
getHelpMessages() |
Integer |
getInteger(String key)
Obtain the Integer value corresponding to the key.
|
String[] |
getKeys() |
String |
getString(String key)
Obtain the value corresponding to the key.
|
void |
setValue(String key,
Object value)
Set a value for a parameter identified by a key.
|
public DynamicOptionClient(Class enclosingClass, String[] otherDefinitions, String... optionDefinition)
public DynamicOptionClient(Class enclosingClass, String... optionDefinition)
enclosingClass - Enclosing class. Simple name will be used to parse options.optionDefinition - option definition in the format key:help:default-valuepublic boolean acceptsOption(String option)
option - Text description of the option, in the format classname:key:valuepublic String getString(String key)
key - option key.public Integer getInteger(String key)
key - option key.public Byte getByte(String key)
key - option key.public Float getFloat(String key)
key - option key.public Double getDouble(String key)
key - option key.public Boolean getBoolean(String key)
key - option key.public void setValue(String key, Object value)
key - option key.value - option new value.public int compareTo(Object o)
compareTo in interface Comparablepublic String[] getHelpMessages()
public String[] getKeys()
public String[] getDefaultValues()
public String getClassname()
Copyright © 2018 Campagne Laboratory. All rights reserved.