71 /** |
71 /** |
72 * Get the value for an option. |
72 * Get the value for an option. |
73 */ |
73 */ |
74 public String get(OptionName name) { |
74 public String get(OptionName name) { |
75 return values.get(name.optionName); |
75 return values.get(name.optionName); |
|
76 } |
|
77 |
|
78 /** |
|
79 * Get the boolean value for an option, patterned after Boolean.getBoolean, |
|
80 * essentially will return true, iff the value exists and is set to "true". |
|
81 */ |
|
82 public boolean getBoolean(String name) { |
|
83 return getBoolean(name, false); |
|
84 } |
|
85 |
|
86 /** |
|
87 * Get the boolean with a default value if the option is not set. |
|
88 */ |
|
89 public boolean getBoolean(String name, boolean defaultValue) { |
|
90 String value = get(name); |
|
91 return (value == null) ? defaultValue : Boolean.parseBoolean(value); |
76 } |
92 } |
77 |
93 |
78 /** |
94 /** |
79 * Check if the value for an undocumented option has been set. |
95 * Check if the value for an undocumented option has been set. |
80 */ |
96 */ |