|
||||||||||
| 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
edu.neu.ccs.XFloat
edu.neu.ccs.HexXFloat
Class HexXFloat extends XFloat
by replacing the three methods:
fromStringData,
toStringData,
and toString,
to use hexadecimal digits rather than decimal digits.
| Field Summary |
| Fields inherited from class edu.neu.ccs.XFloat |
|
| Fields inherited from class edu.neu.ccs.XObject |
changeAdapter, VALUE |
| Constructor Summary | |
HexXFloat()
Constructs a wrapper for the default float value. |
|
HexXFloat(float x)
Constructs a wrapper for the given float value. |
|
HexXFloat(String s)
Constructs a wrapper for the byte value whose state information is encapsulated in the given hexadecimal String data
of length exactly 8. |
|
| Method Summary | |
void |
fromStringData(String s)
Sets the state of this object using information contained in the given hexadecimal String of length exactly 8. |
String |
toString()
Returns the same String as toStringData. |
String |
toStringData()
Returns a hexadecimal String encapsulation of this object
that contains the information needed to set the state of this object at a
later time. |
| Methods inherited from class edu.neu.ccs.XFloat |
byteValue, doubleValue, equals, floatValue, getValue, hashCode, intValue, longValue, parseFloat, setValue, shortValue, toPrimitiveArray, toXArray |
| 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 HexXFloat()
float value.
HexXFloat(float),
HexXFloat(String)public HexXFloat(float x)
float value.
x - the value to be wrappedHexXFloat(),
HexXFloat(String)
public HexXFloat(String s)
throws ParseException
String data
of length exactly 8.
s - a hexadecimal String representation of the
desired value
ParseException - if s is not hexadecimal with exactly 8 digitsHexXFloat(),
HexXFloat(float),
fromStringData(String)| Method Detail |
public void fromStringData(String s)
throws ParseException
Sets the state of this object using information contained in the
given hexadecimal String of length exactly 8.
Uses Hex.hexToFloat internally.
fromStringData in interface StringablefromStringData in class XFloats - a hexadecimal String representation of the
desired value
ParseException - if s is not hexadecimal with exactly 8 digitsHex.hexToFloat(String)public String toStringData()
Returns a hexadecimal String encapsulation of this object
that contains the information needed to set the state of this object at a
later time.
Uses Hex.floatToHex internally.
toStringData in interface StringabletoStringData in class XFloatString encapsulation of this objectHex.floatToHex(float)public String toString()
Returns the same String as toStringData.
toString in class XFloatString encapsulation of this objecttoStringData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||