|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.units.FloatingPointWithUnits
Attribute content wrapper for FloatingPoint with Units. Each FloatingPointWithUnits
content will have wt.units.Unit object. This attribute can only be set
from the constructor.
Supported API: true
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
private static String |
separator
|
(package private) static long |
serialVersionUID
|
private Unit |
unit
|
Constructor Summary | |
FloatingPointWithUnits()
Default constructor to create a Unit instance without Unit object. |
|
FloatingPointWithUnits(Unit unit)
Constructor to construct FloatingPointWithUnits instance with the Unit object from parameter list. |
Method Summary | |
int |
compareTo(Object arg0)
Supported API: false |
boolean |
equals(Object obj)
|
int |
getPrecision()
Call the getPrecision() method of Unit object. |
String |
getUnits()
Call the getUnits() method from Unit object. |
double |
getValue()
Call the getValue() method of the Unit object. |
int |
hashCode()
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(FloatingPointWithUnits thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
String |
toString()
Returns a string representation of the object. |
static FloatingPointWithUnits |
valueOf(String value)
Returns a new FloatingPointWithUnits object initialized to the value of the specified String. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private Unit unit
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static final String separator
Constructor Detail |
public FloatingPointWithUnits()
public FloatingPointWithUnits(Unit unit)
unit
- Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(FloatingPointWithUnits thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public double getValue()
public int getPrecision()
public String getUnits()
public int compareTo(Object arg0)
compareTo
in interface Comparable
arg0
-
public static FloatingPointWithUnits valueOf(String value) throws UnitFormatException, WTNumberFormatException
value
- The value of the Unit object. The precision is calculated from the significant figures of this string representation.
UnitFormatException
WTNumberFormatException
public String toString()
public boolean equals(Object obj)
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |