|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.shared.datatypes.MobyObject org.biomoby.shared.datatypes.MobyFloat
public class MobyFloat
An object representing a Float, a Moby primitive data type.
The value of this object is stored internally as a string, but
during setting it (setValue(java.lang.String)
) it checks for its numeric
value.
Constructor Summary | |
---|---|
MobyFloat()
Default constructor. |
|
MobyFloat(double value)
Another constructor. |
Method Summary | |
---|---|
double |
getFloatValue()
Return the value of this object as a numeric object (double). |
void |
setValue(String value)
Additionally to the same method in the superclass, it checks for numerical value (its length is not limited - internaly it uses BigDecimal object). |
org.jdom.Element |
toXML()
Create an XML element representing this object. |
Methods inherited from class org.biomoby.shared.datatypes.MobyObject |
---|
addXref, format, getId, getMobyTypeName, getName, getNamespace, getProvision, getValue, getXrefs, isPrimitiveType, setId, setName, setNamespace, setProvision, setValueXML, setXrefs, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MobyFloat()
public MobyFloat(double value)
value
- will become the value of this object. If a bigger
number is to be stored then use setValue(String)
.Method Detail |
---|
public org.jdom.Element toXML()
MobyObject
toXML
in class MobyObject
public void setValue(String value) throws MobyException
setValue
in class MobyObject
value
- to be stored
MobyException
- if the 'value' is not numeric (which
includes the case when it is an empty string)how to set value as CDATA
public double getFloatValue() throws MobyException
MobyException
- if the value is too big to be stored in
as Java's double.MobyObject.getValue()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |