|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface represents a value stored in a node.
| Method Summary | |
boolean |
canModify()
Returns whether this value can be changed. |
java.lang.Object |
get()
Returns the value as an Object. |
java.lang.Object |
getField()
Returns the Field object belonging to this value. |
Node |
getNode()
Returns the Node to which this value belongs. |
void |
set(java.lang.Object value)
Sets the value, passing any Object The object type may vary and is generally stored in memory as-is, which means that, generally, the get() method returns the same object. |
void |
setBoolean(boolean value)
Sets the value, passing a boolean value. |
void |
setByte(byte[] value)
Sets the value, passing a byte array. |
void |
setDouble(double value)
Sets the value, passing a double value. |
void |
setFLoat(float value)
Sets the value, passing a float value. |
void |
setInt(int value)
Sets the value, passing a int value. |
void |
setLong(long value)
Sets the value, passing a long value. |
void |
setNode(Node value)
Sets the value, passing a Node. |
void |
setString(java.lang.String value)
Sets the value, passing a String. |
void |
setXML(org.w3c.dom.Document value)
Sets the value, passing a org.w3c.dom.Document object. |
boolean |
toBoolean()
Returns the value as an boolean ( true or false). |
byte[] |
toByte()
Returns the value as a byte array. |
double |
toDouble()
Returns the value as a double. |
float |
toFloat()
Returns the value as a float. |
int |
toInt()
Returns the value as an int. |
long |
toLong()
Returns the value as a long. |
Node |
toNode()
Returns the value as a Node. |
java.lang.String |
toString()
Returns the value as a String. |
org.w3c.dom.Document |
toXML()
Returns the value as a org.w3c.dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. |
org.w3c.dom.Element |
toXML(org.w3c.dom.Document tree)
Returns the value as a org.w3c.dom.Element
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML. |
| Method Detail |
public boolean canModify()
true if the value can be changedpublic java.lang.Object get()
public java.lang.Object getField()
public Node getNode()
public boolean toBoolean()
true or false).
If the actual value is a Boolean object, this call returns it's (primitive) boolean value.
If the actual value is a Number object, this call returns true
if the value is a positive, non-zero, value. In other words, values '0'
and '-1' are concidered false.
If the value is a string, this call returns true if
the value is "true" or "yes" (case-insensitive).
In all other cases (including calling byte fields), false
is returned.
public byte[] toByte()
public float toFloat()
public double toDouble()
public long toLong()
public int toInt()
public Node toNode()
null.
public java.lang.String toString()
public org.w3c.dom.Document toXML()
throws java.lang.IllegalArgumentException
org.w3c.dom.Document
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
If the value cannot be converted, this method returns null
java.lang.IllegalArgumentException - if the Field is not of type TYPE_XML.
public org.w3c.dom.Element toXML(org.w3c.dom.Document tree)
throws java.lang.IllegalArgumentException
org.w3c.dom.Element
If the node value is not itself a Document, the method attempts to
attempts to convert the String value into an XML.
This method fails (throws a IllegalArgumentException) if the Field is not of type TYPE_XML.
If the value cannot be converted, this method returns null
tree - the DOM Document to which the Element is added
(as the document root element)
java.lang.IllegalArgumentException - if the Field is not of type TYPE_XML.public void set(java.lang.Object value)
value - the field value as an Objectget()public void setBoolean(boolean value)
value - the field value as a booleantoBoolean()public void setFLoat(float value)
value - the field value as a floattoFloat()public void setDouble(double value)
value - the field value as a doubletoDouble()public void setLong(long value)
value - the field value as a longtoLong()public void setInt(int value)
value - the field value as a inttoInt()public void setByte(byte[] value)
value - the field value as a byte arraytoByte()public void setString(java.lang.String value)
value - the field value as a StringtoString()public void setNode(Node value)
value - the field value as a NodetoNode()public void setXML(org.w3c.dom.Document value)
value - the field value as a XML DocumenttoXML()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||