|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.XObject
edu.neu.ccs.XNumber
Abstract superclass for
objects
that wrap a numeric value, whether it is a primitive type
or an arbitrary precision representation.
The intention of this class is to provide a specification
for the required casting operations for wrapper classes.
It is documented, though not required
that derived classes of this abstract class
should police promotion and demotion between types
and throw instances of StringableNumberFormatException
when such casting operations cannot be safely performed.
| Field Summary |
| Fields inherited from class edu.neu.ccs.XObject |
changeAdapter, VALUE |
| Constructor Summary | |
XNumber()
|
|
| Method Summary | |
abstract byte |
byteValue()
Returns the value of this number as a byte value. |
abstract double |
doubleValue()
Returns the value of this number as a double value. |
abstract float |
floatValue()
Returns the value of this number as a float value. |
abstract int |
intValue()
Returns the value of this number as a int value. |
abstract long |
longValue()
Returns the value of this number as a long value. |
abstract short |
shortValue()
Returns the value of this number as a short value. |
| Methods inherited from class edu.neu.ccs.XObject |
addPropertyChangeListener, addPropertyChangeListener, formatErrorMessage, fromStringData, removePropertyChangeListener, removePropertyChangeListener, toStringArray, toStringData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XNumber()
| Method Detail |
public abstract byte byteValue()
byte value.
NumberFormatException - if the value cannot be
promoted or demoted to the typepublic abstract short shortValue()
short value.
NumberFormatException - if the value cannot be
promoted or demoted to the typepublic abstract int intValue()
int value.
NumberFormatException - if the value cannot be
promoted or demoted to the typepublic abstract long longValue()
long value.
NumberFormatException - if the value cannot be
promoted or demoted to the typepublic abstract float floatValue()
float value.
NumberFormatException - if the value cannot be
promoted or demoted to the typepublic abstract double doubleValue()
double value.
NumberFormatException - if the value cannot be
promoted or demoted to the type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||