Package org.exolab.adaptx.xslt
Class XSLTFunctionResult
java.lang.Object
org.exolab.adaptx.xpath.XPathResult
org.exolab.adaptx.xslt.XSLTFunctionResult
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TreeFragmentResult
Abstract class representing the result of an XSLT extension function.
- Version:
- $Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $
- Author:
- Keith Visco
- See Also:
-
Field Summary
FieldsFields inherited from class org.exolab.adaptx.xpath.XPathResult
BOOLEAN, NODE_SET, NUMBER, STRING, USER_DEFINED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Returns the result as a boolean value.abstract boolean
equals
(XPathResult result) Returns true if the given expression is the same tyoe as this result and has the same value as this result.int
Returns the type of this result.abstract short
Returns the type of this result.abstract Object
Returns the result as a Java object.abstract double
Returns the result as a number value.abstract String
Returns the result as a string value.
-
Field Details
-
TREE_FRAGMENT
public static final short TREE_FRAGMENTThe tree-fragment result- See Also:
-
-
Constructor Details
-
XSLTFunctionResult
public XSLTFunctionResult()
-
-
Method Details
-
getXSLTResultType
public abstract short getXSLTResultType()Returns the type of this result.- Returns:
- The type of this result
-
getResultType
public int getResultType()Returns the type of this result. This should always be XPathResult.USER_DEFINED.- Specified by:
getResultType
in classXPathResult
- Returns:
- The type of this result
- See Also:
-
booleanValue
public abstract boolean booleanValue()Returns the result as a boolean value. Returns the value of a boolean result, true for a non-empty string result, true for a non-zero number result, and true from a non-empty node-set.- Specified by:
booleanValue
in classXPathResult
- Returns:
- The result as a boolean value
-
numberValue
public abstract double numberValue()Returns the result as a number value. Returns 0 or 1 for a boolean result, the parsed value for a string result, the value of a number result, or the parsed value of a node-set.- Specified by:
numberValue
in classXPathResult
- Returns:
- The result as a number value
-
stringValue
Returns the result as a string value. Returns "false" or "true" for a boolean result, the value of a string result, the string value of a number result, or the string value of a node-set.- Specified by:
stringValue
in classXPathResult
- Returns:
- The result as a string value
-
javaObject
Returns the result as a Java object. Returns an object of typeBoolean
for a boolean result, an object of typeString
for a string result, an object of typeDouble
for a number result, or an object of typeNodeSet
for a node-set.- Specified by:
javaObject
in classXPathResult
- Returns:
- The result as a Java object
-
equals
Returns true if the given expression is the same tyoe as this result and has the same value as this result.- Specified by:
equals
in classXPathResult
- Parameters:
result
- An XPath result- Returns:
- True if same type and same value as this result
-