com.martiansoftware.jsap.stringparsers
Class BigIntegerStringParser
java.lang.Object
com.martiansoftware.jsap.StringParser
com.martiansoftware.jsap.stringparsers.BigIntegerStringParser
- public class BigIntegerStringParser
- extends StringParser
A StringParser for parsing BigIntegers. The parse() method delegates the
actual
parsing to BigInteger's constructor.
- Author:
- Marty Lamb
- See Also:
StringParser
,
BigInteger
Method Summary |
Object |
parse(String arg)
Parses the specified argument into a BigInteger. |
BigIntegerStringParser
public BigIntegerStringParser()
- Creates a new BigIntegerStringParser.
parse
public Object parse(String arg)
throws ParseException
- Parses the specified argument into a BigInteger. This method simply
delegates
the parsing to
new BigInteger(String)
. If BigInteger
throws a
NumberFormatException, it is encapsulated into a ParseException and
re-thrown.
- Specified by:
parse
in class StringParser
- Parameters:
arg
- the argument to parse
- Returns:
- a BigInteger object with the value contained in the specified
argument.
- Throws:
ParseException
- if new BigInteger(arg)
throws a
NumberFormatException.- See Also:
BigInteger
,
StringParser.parse(String)
Copyright © 2002-2004, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap