|
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.MobyInteger
public class MobyInteger
An object representing an Integer, 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 and
integer value.
Constructor Summary | |
---|---|
MobyInteger()
Default constructor. |
|
MobyInteger(long value)
Another constructor. |
Method Summary | |
---|---|
long |
getIntValue()
Return the value of this object as a numeric object (long). |
void |
setValue(String value)
Additionally to the same method in the superclass, it checks for numerical and integer value (its length is not limited - internaly it uses BigInteger 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 MobyInteger()
public MobyInteger(long 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 long getIntValue() throws MobyException
MobyException
- if the value is too big to be stored in
as Java's long.MobyObject.getValue()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |