Class BigIntegerStringParser
java.lang.Object
com.martiansoftware.jsap.StringParser
com.martiansoftware.jsap.stringparsers.BigIntegerStringParser
A
StringParser for parsing BigIntegers. The parse() method delegates the
actual
parsing to BigInteger's constructor.- Author:
- Marty Lamb
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BigIntegerStringParserReturns aBigIntegerStringParser.Parses the specified argument into a BigInteger.Methods inherited from class StringParser
setUp, tearDown
-
Constructor Details
-
BigIntegerStringParser
public BigIntegerStringParser()Deprecated.UsegetParser()or, even better,JSAP.BIGINTEGER_PARSER.Creates a new BigIntegerStringParser.
-
-
Method Details
-
getParser
Returns aBigIntegerStringParser.Convenient access to the only instance returned by this method is available through
JSAP.BIGINTEGER_PARSER.- Returns:
- a
BigIntegerStringParser.
-
parse
Parses the specified argument into a BigInteger. This method simply delegates the parsing tonew BigInteger(String). If BigInteger throws a NumberFormatException, it is encapsulated into a ParseException and re-thrown.- Specified by:
parsein classStringParser- Parameters:
arg- the argument to parse- Returns:
- a BigInteger object with the value contained in the specified argument.
- Throws:
ParseException- ifnew BigInteger(arg)throws a NumberFormatException.- See Also:
-
getParser()or, even better,JSAP.BIGINTEGER_PARSER.