/** * Cast result object to a string. * * @return The string this wraps or the empty string if null */ public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb) { XString xstring = (XString)xstr(); xstring.appendToFsb(fsb); }
/** * Cast result object to a string. * * @return The string this wraps or the empty string if null */ public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb) { XString xstring = (XString)xstr(); xstring.appendToFsb(fsb); }
/** * Return the string representation of the object * * * @return the string representation of the object */ public String toString() { return str(); }
/** * Apply the operation to two operands, and return the result. * * * @param right non-null reference to the evaluated right operand. * * @return non-null reference to the XObject that represents the result of the operation. * * @throws javax.xml.transform.TransformerException */ public XObject operate(XObject right) throws javax.xml.transform.TransformerException { return new XNumber(-right.num()); }
/** * Cast result object to a boolean, but allow side effects, such as the * incrementing of an iterator. * * @return True if there is a next node in the nodeset */ public boolean boolWithSideEffects() throws javax.xml.transform.TransformerException { return bool(); }
/** * Tell if two objects are functionally equal. * * @param obj2 Object to compare this to * * @return True if the given object is of type CLASS_NULL */ public boolean equals(XObject obj2) { return obj2.getType() == CLASS_NULL; } }
/** * Cast result object to an XMLString. * * @return The document fragment node data or the empty string. */ public XMLString xstr() { int node = item(0); return (node != DTM.NULL) ? getStringFromNode(node) : XString.EMPTYSTRING; }
/** * Create an XRTreeFrag Object. * */ public XRTreeFrag(int root, XPathContext xctxt, ExpressionNode parent) { super(null); exprSetParent(parent); initDTM(root, xctxt); }
/** * Cast result object to a nodelist. Always issues an error. * * @return null * * @throws javax.xml.transform.TransformerException */ public NodeList nodelist() throws javax.xml.transform.TransformerException { return (m_origObj instanceof NodeList) ? (NodeList)m_origObj : super.nodelist(); }
/** * Cast result object to a number. * * @return numeric value of the string conversion from the * next node in the NodeSetDTM, or NAN if no node was found */ public double num() { int node = item(0); return (node != DTM.NULL) ? getNumberFromNode(node) : Double.NaN; }
/** * Cast result object to a number, but allow side effects, such as the * incrementing of an iterator. * * @return numeric value of the string conversion from the * next node in the NodeSetDTM, or NAN if no node was found */ public double numWithSideEffects() { int node = nextNode(); return (node != DTM.NULL) ? getNumberFromNode(node) : Double.NaN; }
/** * Create a new XMLString from a Java string. * * * @param string Java String reference, which must be non-null. * * @return An XMLString object that wraps the String reference. */ public XMLString newstr(String string) { return new XString(string); }
/** * Create an XRTreeFrag Object. * */ public XRTreeFrag(int root, XPathContext xctxt) { super(null); initDTM(root, xctxt); }
/** * Create an XObject. * * @param obj Can be any object, should be a specific type * for derived classes, or null. */ public XObject(Object obj) { setObject(obj); }
/** * Cast result object to a nodelist. Always issues an error. * * @return null * * @throws javax.xml.transform.TransformerException */ public NodeIterator nodeset() throws javax.xml.transform.TransformerException { return (m_origObj instanceof NodeIterator) ? (NodeIterator)m_origObj : super.nodeset(); }
/** * Returns the axis being iterated, if it is known. * * @return Axis.CHILD, etc., or -1 if the axis is not known or is of multiple * types. */ public int getAxis() { return m_exprObj.getAxis(); }
/** * Get the index of the last node that can be itterated to. * * * @param xctxt XPath runtime context. * * @return the index of the last node that can be itterated to. */ public int getLastPos(XPathContext xctxt) { return m_exprObj.getLength(); }
/** * Returns true if all the nodes in the iteration well be returned in document * order. * Warning: This can only be called after setRoot has been called! * * @return true as a default. */ public boolean isDocOrdered() { return m_exprObj.isDocOrdered(); }
/** * Cast result object to a string. * * @return The string this wraps or the empty string if null */ public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb) { XString xstring = (XString)xstr(); xstring.appendToFsb(fsb); }
/** * Cast result object to a string. * * @return The string this wraps or the empty string if null */ public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb) { XString xstring = (XString)xstr(); xstring.appendToFsb(fsb); }