|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--acm.util.OptionTable
public class OptionTable extends HashMap
| Constructor Summary |
| OptionTable(Map map) |
| OptionTable(String str) |
| OptionTable(String str,
String[] keys) |
| Method Summary | |
| double | getDoubleOption(String key) |
| double | getDoubleOption(String key,
double defValue) |
| int | getIntOption(String key) |
| int | getIntOption(String key,
int defValue) |
| String | getOption(String key) |
| String | getOption(String key,
String defValue) |
| boolean | isSpecified(String key) |
| Constructor Detail |
public OptionTable(Map map)| Usage: | OptionTable options = new OptionTable(map); | ||
| Parameter: |
|
public OptionTable(String str)| Usage: | OptionTable options = new OptionTable(str); | ||
| Parameter: |
|
public OptionTable(String str,
String[] keys)| Usage: | OptionTable options = new OptionTable(str, keys); | ||||
| Parameters: |
|
| Method Detail |
public double getDoubleOption(String key)| Usage: | double value = options.getDoubleOption(key); | ||
| Parameter: |
| ||
| Returns: | The corresponding option value parsed as a double |
public double getDoubleOption(String key,
double defValue)| Usage: | double value = options.getDoubleOption(key, defValue); | ||||
| Parameters: |
| ||||
| Returns: | The corresponding option value |
public int getIntOption(String key)| Usage: | int value = options.getIntOption(key); | ||
| Parameter: |
| ||
| Returns: | The corresponding option value parsed as an integer |
public int getIntOption(String key,
int defValue)| Usage: | int value = options.getIntOption(key, defValue); | ||||
| Parameters: |
| ||||
| Returns: | The corresponding option value |
public String getOption(String key)| Usage: | String value = options.getOption(key); | ||
| Parameter: |
| ||
| Returns: | The corresponding option value |
public String getOption(String key,
String defValue)| Usage: | String value = options.getOption(key, defValue); | ||||
| Parameters: |
| ||||
| Returns: | The corresponding option value |
public boolean isSpecified(String key)| Usage: | if (options.isSpecified(key)) . . . | ||
| Parameter: |
| ||
| Returns: | true if key was specified in the option string |
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||