edu.rice.cs.drjava.config
Class LongOption
java.lang.Object
edu.rice.cs.drjava.config.OptionParser<T>
edu.rice.cs.drjava.config.Option<Long>
edu.rice.cs.drjava.config.LongOption
- All Implemented Interfaces:
- FormatStrategy<Long>, ParseStrategy<Long>
public class LongOption
- extends Option<Long>
Class defining all configuration options with values of type Long.
- Version:
- $Id: LongOption.java 4419 2008-03-27 06:58:07Z rcartwright $
Method Summary |
Long |
parse(String s)
The ability to parse a string to an object of type T. |
LongOption
public LongOption(String key,
Long def)
- Parameters:
key
- The name of this Option.def
- The default value for this option
parse
public Long 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<Long>
- Specified by:
parse
in class OptionParser<Long>
- Parameters:
s
- The String to be parsed.
- Returns:
- The Long object represented by "s".
- Throws:
IllegalArgumentException
- if "s" does not represent a long value: only Strings that can be generated
by the method Integer.toString() are supported.