|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.neu.ccs.XObject
|
+--edu.neu.ccs.XNumber
|
+--edu.neu.ccs.XBigInteger
Object wrapper for the arbitrary precision
BigInteger class that also provides
capabilities.
The default value for this class is
the StringableBigInteger representation of zero,
.BigInteger.ZERO
| Field Summary |
| Fields inherited from class edu.neu.ccs.XObject |
changeAdapter, VALUE |
| Constructor Summary | |
XBigInteger()
Constructs a wrapper for the default BigInteger value of
BigInteger.ZERO. |
|
XBigInteger(BigInteger b)
Constructs a wrapper for the given BigInteger value. |
|
XBigInteger(String s)
Constructs a wrapper for the BigInteger value
whose state information is encapsulated
in the given String data. |
|
| Method Summary | |
byte |
byteValue()
Returns the value of this number as a byte value. |
double |
doubleValue()
Returns the value of this number as a double value. |
boolean |
equals(Object other)
Returns true if the wrapped object
is equal to the given object, and false
if it is not. |
float |
floatValue()
Returns the value of this number as a float value. |
void |
fromStringData(String data)
Sets the state of this object using information contained in the given String. |
BigInteger |
getValue()
Returns the value wrapped by this object. |
int |
hashCode()
Returns an int hash code
appropriate for the wrapped object. |
int |
intValue()
Returns the value of this number as a int value. |
long |
longValue()
Returns the value of this number as a long value. |
void |
setValue(BigInteger b)
Sets the value wrapped by this object to the given value. |
short |
shortValue()
Returns the value of this number as a short value. |
static BigInteger[] |
toPrimitiveArray(XBigInteger[] x)
Returns an array of BigInteger objects
copied from the given array
of XBigInteger objects. |
String |
toString()
Returns a String representation
of the wrapped value. |
String |
toStringData()
Returns a String encapsulation of this object
that contains information needed
to set the state of this object at a later time. |
static XBigInteger[] |
toXArray(BigInteger[] a)
Returns an array of XBigInteger objects
initialized from the given array
of BigInteger objects. |
| Methods inherited from class edu.neu.ccs.XObject |
addPropertyChangeListener, addPropertyChangeListener, formatErrorMessage, removePropertyChangeListener, removePropertyChangeListener, toStringArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public XBigInteger()
BigInteger value of
BigInteger.ZERO.
XBigInteger(BigInteger),
XBigInteger(String)public XBigInteger(BigInteger b)
BigInteger value.
If the given value is null,
the wrapped value is set to
BigInteger.ZERO.
b - the value to be wrappedXBigInteger(),
XBigInteger(String)
public XBigInteger(String s)
throws ParseException
BigInteger value
whose state information is encapsulated
in the given String data.
s - a String representation
of the desired value
ParseException - if the data is malformedXBigInteger(),
XBigInteger(BigInteger)| Method Detail |
public void fromStringData(String data)
throws ParseException
StringableString.
fromStringData in interface StringablefromStringData in class XObjectdata - the String containing state information
ParseException - if the data is malformedStringable.toStringData()public String toStringData()
StringableString encapsulation of this object
that contains information needed
to set the state of this object at a later time.
toStringData in interface StringabletoStringData in class XObjectStringable.fromStringData(String)public byte byteValue()
XNumberbyte value.
byteValue in class XNumberpublic short shortValue()
XNumbershort value.
shortValue in class XNumberpublic int intValue()
XNumberint value.
intValue in class XNumberpublic long longValue()
XNumberlong value.
longValue in class XNumberpublic float floatValue()
XNumberfloat value.
floatValue in class XNumberpublic double doubleValue()
XNumberdouble value.
doubleValue in class XNumberpublic boolean equals(Object other)
true if the wrapped object
is equal to the given object, and false
if it is not.
equals in class Objectpublic int hashCode()
int hash code
appropriate for the wrapped object.
hashCode in class Objectpublic String toString()
String representation
of the wrapped value.
toString in class Objectpublic void setValue(BigInteger b)
null, the value is set
to the default value.
b - the value to be wrappedgetValue()public BigInteger getValue()
setValue(BigInteger)public static BigInteger[] toPrimitiveArray(XBigInteger[] x)
BigInteger objects
copied from the given array
of XBigInteger objects.
x - an array of XBigIntegers
BigInteger objectstoXArray(BigInteger[])public static XBigInteger[] toXArray(BigInteger[] a)
XBigInteger objects
initialized from the given array
of BigInteger objects.
a - an array of BigIntegers
XBigInteger objectstoPrimitiveArray(XBigInteger[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||