|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.neu.ccs.parser.ParserUtilities
Provides utility methods for use with parser operations.
Parser| Constructor Summary | |
ParserUtilities()
|
|
| Method Summary | |
static Parser |
getDefaultParser()
Returns the default parser used by JPT classes. |
static boolean |
isXBoolean(Object x)
Return true if x is XBoolean. |
static boolean |
isXFloating(Object x)
Return true if x is floating, that is, if x is one of the types: XBigDecimal,
XDouble,
XFloat. |
static boolean |
isXIntegral(Object x)
Return true if x is integral, that is, if x is one of the types: XBigInteger,
XLong,
XInt,
XShort,
XByte. |
static boolean |
isXNumber(Object x)
Return true if x is an XNumber. |
static void |
setDefaultParser(Parser p)
Sets the default parser used by JPT classes to the given parser. |
static XBigDecimal |
toXBigDecimal(XNumber value)
Converts the given value to XBigDecimal. |
static XBigInteger |
toXBigInteger(XNumber value)
Converts the given value to XBigInteger. |
static XDouble |
toXDouble(XNumber value)
Converts the given value to XDouble. |
static XLong |
toXLong(XNumber value)
Converts the given value to XLong. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ParserUtilities()
| Method Detail |
public static Parser getDefaultParser()
public static void setDefaultParser(Parser p)
null, the default parser is set
to the standard default parser for the JPT.
p - the desired default parserpublic static boolean isXNumber(Object x)
XNumber.
public static boolean isXIntegral(Object x)
XBigInteger,
XLong,
XInt,
XShort,
XByte.
public static boolean isXFloating(Object x)
XBigDecimal,
XDouble,
XFloat.
public static boolean isXBoolean(Object x)
public static XLong toXLong(XNumber value)
value - the value to be convertedpublic static XDouble toXDouble(XNumber value)
value - the value to be convertedpublic static XBigInteger toXBigInteger(XNumber value)
value - the value to be convertedpublic static XBigDecimal toXBigDecimal(XNumber value)
value - the value to be converted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||