|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.xpath.object.XObject
XObject is the base class for the classes that represent objects of the four basic XPath types node-set, boolean, number and string.
Field Summary | |
static int |
TYPE_BOOLEAN
The boolean type constant. |
static int |
TYPE_NODESET
The node-set type constant. |
static int |
TYPE_NUMBER
The number type constant. |
static int |
TYPE_STRING
The string type constant. |
static int |
TYPE_VARIABLE
A type constant for objects whose value depends on runtime contexts. |
static int |
TYPES
The number of existing types, the first type has code 0. |
Constructor Summary | |
XObject()
|
Method Summary | |
abstract int |
canConvertTo(Class javaClass)
Test if the XObject can be converted to an object with the given class. |
boolean |
compare(Equality equality,
boolean value)
Return if this XObject equals the given value. |
boolean |
compare(Equality equality,
double value)
Return if this XObject equals the given value. |
abstract boolean |
compare(Equality equality,
String value)
Return if this XObject equals the given value. |
boolean |
compare(Equality equality,
XObject object)
Return if this XObject equals the given value. |
boolean |
compare(Relation relation,
double value)
Compare this XObject to the number value according the given relation. |
boolean |
compare(Relation relation,
XObject object)
Compare this XObject to the other object according the given relation. |
boolean |
equals(Object obj)
Test if the given object equals this object. |
abstract int |
getType()
Return the type code of this XObject. |
String |
getTypeName()
Return the name of this objects type. |
static String |
getTypeName(int type)
Return the name of the type. |
int |
hashCode()
Return a hashcode for this XObject. |
abstract boolean |
toBooleanValue()
Convert the XObject to a boolean. |
XNodeSet |
toNodeSet()
Convert the XObject to a NodeSet. |
abstract double |
toNumberValue()
Convert the XObject to a double. |
String |
toString()
Return a debug string representation of this XObject. |
abstract String |
toStringValue()
Convert the XObject to a String. |
abstract Object |
toValue()
Return the objects value as a java object. |
abstract Object |
toValue(Class javaClass)
Convert the objects value to an object of the given class. |
XObject |
toXObject(int type)
Convert the XObject to an XObject with the given type. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TYPE_BOOLEAN
getType()
,
Constant Field Valuespublic static final int TYPE_NUMBER
getType()
,
Constant Field Valuespublic static final int TYPE_STRING
getType()
,
Constant Field Valuespublic static final int TYPE_NODESET
getType()
,
Constant Field Valuespublic static final int TYPE_VARIABLE
getType()
,
Constant Field Valuespublic static final int TYPES
Constructor Detail |
public XObject()
Method Detail |
public abstract int getType()
public final String getTypeName()
public static String getTypeName(int type)
public abstract Object toValue()
public abstract Object toValue(Class javaClass)
public abstract int canConvertTo(Class javaClass)
public abstract boolean toBooleanValue()
public abstract double toNumberValue()
public abstract String toStringValue()
public XNodeSet toNodeSet() throws XPathException
XPathException
- thrown if the conversion is not possiblepublic XObject toXObject(int type)
XPathException
- thrown if the conversion is not possiblepublic abstract boolean compare(Equality equality, String value)
public boolean compare(Equality equality, boolean value)
public boolean compare(Equality equality, double value)
public boolean compare(Relation relation, double value)
public boolean compare(Equality equality, XObject object)
public boolean compare(Relation relation, XObject object)
public int hashCode()
public boolean equals(Object obj)
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |