org.apache.xpath.objects
public class XNumber extends XObject
UNKNOWN: general
Constructor Summary | |
---|---|
XNumber(double d)
Construct a XNodeSet object.
| |
XNumber(Number num)
Construct a XNodeSet object.
|
Method Summary | |
---|---|
boolean | bool()
Cast result object to a boolean.
|
void | callVisitors(ExpressionOwner owner, XPathVisitor visitor) |
boolean | equals(XObject obj2)
Tell if two objects are functionally equal.
|
int | getType()
Tell that this is a CLASS_NUMBER.
|
String | getTypeString()
Given a request type, return the equivalent string.
|
boolean | isStableNumber()
Tell if this expression returns a stable number that will not change during
iterations within the expression. |
double | num()
Cast result object to a number.
|
double | num(XPathContext xctxt)
Evaluate expression to a number.
|
Object | object()
Return a java object that's closest to the representation
that should be handed to an extension.
|
String | str()
Cast result object to a string.
|
Parameters: d Value of the object
Parameters: num Value of the object
Returns: false if the value is NaN or equal to 0.0
See Also: XPathVisitable
Parameters: obj2 Object to compare this to
Returns: true if the two objects are equal
Throws: javax.xml.transform.TransformerException
Returns: node type CLASS_NUMBER
Returns: type string "#NUMBER"
Returns: true if the expression represents a stable number.
Returns: the value of the XNumber object
Returns: 0.0
Throws: javax.xml.transform.TransformerException
Returns: The value of this XNumber as a Double object
Returns: "NaN" if the number is NaN, Infinity or -Infinity if the number is infinite or the string value of the number.