edu.rice.cs.drjava.config
Class BooleanOption
java.lang.Object
edu.rice.cs.drjava.config.OptionParser<T>
edu.rice.cs.drjava.config.Option<Boolean>
edu.rice.cs.drjava.config.BooleanOption
- All Implemented Interfaces:
- FormatStrategy<Boolean>, ParseStrategy<Boolean>
public class BooleanOption
- extends Option<Boolean>
Class defining all configuration options with values of type Boolean.
- Version:
- $Id: BooleanOption.java 4447 2008-04-18 16:06:34Z rcartwright $
Method Summary |
Boolean |
parse(String s)
The ability to parse a string to an object of type T. |
BooleanOption
public BooleanOption(String key,
Boolean def)
- Parameters:
key
- The name of this option.
parse
public Boolean parse(String s)
- Description copied from class:
OptionParser
- The ability to parse a string to an object of type T. All concrete versions of this class must override this
method to provide some sort of parser implementation.
- Specified by:
parse
in interface ParseStrategy<Boolean>
- Specified by:
parse
in class OptionParser<Boolean>
- Parameters:
s
- The String to be parsed.
- Returns:
- A Boolean instance represented by "s".
- Throws:
IllegalArgumentException
- if "s" is
not one of the Strings "true" and "false".