org.exolab.adaptx.xpath
public final class NodeSet extends XPathResult
Version: $Revision: 3739 $ $Date: 2003-05-13 04:01:12 -0400 (Tue, 13 May 2003) $
Constructor Summary | |
---|---|
NodeSet()
Constructs a new empty node-set.
| |
NodeSet(XPathNode node)
Constructs a new node-set with the specified node.
| |
NodeSet(int size)
Constructs a new empty node-set with the specified size.
|
Method Summary | |
---|---|
boolean | add(XPathNode node)
Adds the specified node to this node-set without duplication.
|
boolean | add(XPathNode node, boolean ignoreDuplicates)
Adds the specified node to this node-set. |
void | add(NodeSet nodeSet)
Adds all nodes from the specified node-set to this node-set
without duplication.
|
void | add(NodeSet nodeSet, boolean ignoreDuplicates)
Adds all nodes from the specified node-set to this node-set.
|
boolean | booleanValue()
Returns the result as a boolean value. |
void | clear()
Removes all elements from this node-set.
|
boolean | contains(XPathNode node)
Returns true if the specified node is contained in this node-set.
|
boolean | equals(XPathResult result)
Returns true if the given result is a node-set result
and has the same set of nodes.
|
int | getResultType()
Returns the type of this result.
|
int | indexOf(XPathNode node)
Returns the position of the specified node in this node-set.
|
XPathNode | item(int index)
Returns the node at the specified index. |
Object | javaObject()
Returns the result as a Java object. |
double | numberValue()
Returns the result as a number value. |
boolean | remove(XPathNode node)
Removes the specified node from the node-set. |
void | remove(int index)
Removes the specified node from the node-set. |
int | size()
Returns the number of nodes in the node-set.
|
String | stringValue()
Returns the result as a string value. |
XPathNode[] | toArray()
Returns an array containing all the nodes in this node-set.
|
String | toString()
Returns the string representation of this NodeSet. |
Parameters: node The node to include in the node-set
Parameters: size The expected node-set size
Parameters: node The node to add to this node-set
Returns: True if the node was added, false if the node was already in this node-set
Parameters: node The node to add to this node-set ignoreDuplicates If true, do not perform duplicate checking
Returns: True if the node was added, false if the node was already in this node-set
Parameters: nodeSet The node-set from which to add nodes
Parameters: nodeSet The node-set from which to add nodes ignoreDuplicates If true, do not perform duplicate checking *
Returns: The result as a boolean value
Parameters: node The specified node to search
Returns: True if the specified node is contained in this node-set
Parameters: result An XPath result
Returns: True if a node-set result and has same set of nodes
Returns: NODE_SET
The node's index is based on the order in which it was added to the node-set, minus any nodes of lower index position that were removed from the node-set. The index ranges between zero and size() - 1 (inclusive).
Parameters: node the Node to get the index for
Parameters: index The position of the node to return
Returns: The result as a Java object
Returns: The result as a number value
Parameters: node The node to remove from this node-set
Returns: True if the node was removed
Parameters: index The position of the node to remove
Returns: True if the node was removed
Returns: The number of nodes in the node-set
Note: currently returns the string value of the first node in the node-set.
Returns: The result as a string value
Returns: An array containing all the nodes in this node-set
Returns: the string representation of this NodeSet.