public class XNumber extends XObject
CLASS_BOOLEAN, CLASS_NODESET, CLASS_NULL, CLASS_NUMBER, CLASS_RTREEFRAG, CLASS_STRING, CLASS_UNKNOWN, CLASS_UNRESOLVEDVARIABLE| Constructor and Description |
|---|
XNumber(double d)
Construct a XNodeSet object.
|
XNumber(java.lang.Number num)
Construct a XNodeSet object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
bool()
Cast result object to a boolean.
|
void |
callVisitors(ExpressionOwner owner,
XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for
each member.
|
boolean |
equals(XObject obj2)
Tell if two objects are functionally equal.
|
int |
getType()
Tell that this is a CLASS_NUMBER.
|
java.lang.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.
|
java.lang.Object |
object()
Return a java object that's closest to the representation
that should be handed to an extension.
|
java.lang.String |
str()
Cast result object to a string.
|
allowDetachToRelease, appendToFsb, boolWithSideEffects, castToType, create, create, deepEquals, destruct, detach, dispatchCharactersEvents, execute, fixupVariables, getFresh, greaterThan, greaterThanOrEqual, iter, lessThan, lessThanOrEqual, mutableNodeset, nodelist, nodeset, notEquals, numWithSideEffects, reset, rtf, rtf, rtree, rtree, toString, xstrasIterator, asIteratorRaw, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, warn, xstrpublic XNumber(double d)
d - Value of the objectpublic XNumber(java.lang.Number num)
num - Value of the objectpublic int getType()
public java.lang.String getTypeString()
getTypeString in class XObjectpublic double num()
public double num(XPathContext xctxt) throws TransformerException
num in class Expressionxctxt - The XPath runtime context.TransformerExceptionpublic boolean bool()
public java.lang.String str()
public java.lang.Object object()
public boolean equals(XObject obj2)
equals in class XObjectobj2 - Object to compare this toTransformerExceptionpublic boolean isStableNumber()
isStableNumber in class Expressionpublic void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
XPathVisitablecallVisitors in interface XPathVisitablecallVisitors in class XObjectowner - The owner of the visitor, where that path may be
rewritten if needed.visitor - The visitor whose appropriate method will be called.XPathVisitable.callVisitors(ExpressionOwner, XPathVisitor)Copyright © 2014 Apache XML Project. All Rights Reserved.