jd.xml.xpath.object
Class XConvertibleNodeSet

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.XConvertibleNodeSet

class XConvertibleNodeSet
extends XMutableNodeSet

A XMutableNodeSet that can be converted to another XPath type and therefore stores only the first added node


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
(package private) XConvertibleNodeSet()
           
 
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.ORDER_CONVERTIBLE.
 boolean isEmpty()
          Return if the nodeset is empty.
protected  void mergeMultiDoc(XNodeSet set1, XNodeSet set2)
          Merge two node-sets whose nodes belong to different documents.
protected  void mergeSingleDoc(XNodeSet set1, XNodeSet set2)
          Merge two node-sets whose nodes all belong to the same document.
 int size()
          Return the size of the NodeSet.
 
Methods inherited from class jd.xml.xpath.object.XMutableNodeSet
merge, 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, toString, 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

XConvertibleNodeSet

XConvertibleNodeSet()
Method Detail

getOrdering

public int getOrdering()
Return XNodeSet.ORDER_CONVERTIBLE.

Overrides:
getOrdering in class XNodeSet

size

public int size()
Return the size of the NodeSet.

Specified by:
size in class XNodeSet

isEmpty

public boolean isEmpty()
Return if the nodeset is empty.

Overrides:
isEmpty in class XNodeSet

getNode

public XPathNode getNode(int index)
Get the node for the given index.

Specified by:
getNode in class XNodeSet

addNode

public void addNode(XPathNode node)
Add a node to the nodeset.

Specified by:
addNode in class XMutableNodeSet

addNodes

public void addNodes(XNodeSet nodeSet)
Add another nodeset to this nodeset.

Overrides:
addNodes in class XMutableNodeSet

mergeSingleDoc

protected void mergeSingleDoc(XNodeSet set1,
                              XNodeSet set2)
Merge two node-sets whose nodes all belong to the same document.

Overrides:
mergeSingleDoc in class XMutableNodeSet

mergeMultiDoc

protected void mergeMultiDoc(XNodeSet set1,
                             XNodeSet set2)
Merge two node-sets whose nodes belong to different documents.

Overrides:
mergeMultiDoc in class XMutableNodeSet