jd.xml.xpath.object
Class XCountNodeSet

java.lang.Object
  extended byjd.xml.xpath.object.XObject
      extended byjd.xml.xpath.object.XNodeSet
          extended byjd.xml.xpath.object.XMutableNodeSet
              extended byjd.xml.xpath.object.XCountNodeSet

class XCountNodeSet
extends XMutableNodeSet

A XMutableNodeSet that does not store the added nodes but only updates the size information.


Field Summary
 
Fields inherited from class jd.xml.xpath.object.XNodeSet
ORDER_CONVERTIBLE, ORDER_COUNTED, ORDER_ORDERED, ORDER_SUMMARIZED, ORDER_UNORDERED
 
Fields inherited from class jd.xml.xpath.object.XObject
TYPE_BOOLEAN, TYPE_NODESET, TYPE_NUMBER, TYPE_STRING, TYPE_VARIABLE, TYPES
 
Constructor Summary
protected XCountNodeSet()
           
 
Method Summary
 void addNode(XPathNode node)
          Add a node to the nodeset.
 void addNodes(XNodeSet nodeSet)
          Add another nodeset to this nodeset.
 XPathNode getNode(int index)
          Get the node for the given index.
 int getOrdering()
          Return XNodeset.COUNTED.
 boolean isEmpty()
          Return if the nodeset is empty.
 void setNode(XPathNode node, int index)
           
 int size()
          Return the size of the NodeSet.
 String toString()
          Return a debug string representation of this XObject.
 
Methods inherited from class jd.xml.xpath.object.XMutableNodeSet
merge, mergeMultiDoc, mergeSingleDoc, sort
 
Methods inherited from class jd.xml.xpath.object.XNodeSet
canConvertTo, compare, compare, compare, compare, compare, compare, compare, contains, contains, getDocId, getNodeSum, getType, indexOf, isOrdered, isOrdered, setDocId, setMultiDocId, toBooleanValue, toNodeSet, toNumberValue, toNumberValue, toStringValue, toStringValue, toValue, toValue
 
Methods inherited from class jd.xml.xpath.object.XObject
compare, equals, getTypeName, getTypeName, hashCode, toXObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XCountNodeSet

protected XCountNodeSet()
Method Detail

getOrdering

public int getOrdering()
Return XNodeset.COUNTED.

Overrides:
getOrdering in class XNodeSet

size

public int size()
Description copied from class: XNodeSet
Return the size of the NodeSet.

Specified by:
size in class XNodeSet

isEmpty

public boolean isEmpty()
Description copied from class: XNodeSet
Return if the nodeset is empty.

Overrides:
isEmpty in class XNodeSet

getNode

public XPathNode getNode(int index)
Description copied from class: XNodeSet
Get the node for the given index.

Specified by:
getNode in class XNodeSet

setNode

public void setNode(XPathNode node,
                    int index)

addNode

public void addNode(XPathNode node)
Description copied from class: XMutableNodeSet
Add a node to the nodeset.

Specified by:
addNode in class XMutableNodeSet

addNodes

public void addNodes(XNodeSet nodeSet)
Description copied from class: XMutableNodeSet
Add another nodeset to this nodeset.

Overrides:
addNodes in class XMutableNodeSet

toString

public String toString()
Return a debug string representation of this XObject.

Overrides:
toString in class XNodeSet