public class XNumber extends XObject
CLASS_BOOLEAN, CLASS_NODESET, CLASS_NULL, CLASS_NUMBER, CLASS_RTREEFRAG, CLASS_STRING, CLASS_UNKNOWN, m_obj| Constructor and Description |
|---|
XNumber(double d)
Construct a XNodeSet object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
bool()
Cast result object to a boolean.
|
void |
callVisitors(XPathVisitor visitor)
This will traverse the hierarchy, calling the visitor for each member.
|
boolean |
equals(XObject obj2)
Tell if two objects are functionally equal.
|
int |
getType()
Tell what kind of class this is.
|
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.
|
allowDetachToRelease, boolWithSideEffects, deepEquals, detach, error, error, execute, greaterThan, greaterThanOrEqual, iter, lessThan, lessThanOrEqual, mutableNodeset, nodelist, nodeset, notEquals, numWithSideEffects, setObject, toString, xstrasIterator, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClasspublic XNumber(double d)
d - Value of the objectpublic int getType()
public String getTypeString()
getTypeString in class XObjectpublic double num()
public double num(XPathContext xctxt) throws TransformerException
num in class Expressionxctxt - The XPath runtime context.TransformerException - if anypublic boolean bool()
public String str()
public Object object()
public boolean equals(XObject obj2)
public boolean isStableNumber()
isStableNumber in class Expressionpublic void callVisitors(XPathVisitor visitor)
callVisitors in interface XPathVisitablecallVisitors in class XObjectvisitor - The visitor whose appropriate method will be called.Copyright © 2022–2023. All rights reserved.