MultiValuedNodeHeapIterator takes a set of multi-valued
heap nodes and produces a merged NodeSet in document order with duplicates
removed.
Each multi-valued heap node (which might be a
org., but that's not necessary)
generates DTM node handles in document order. The class
maintains the multi-valued heap nodes in a heap, not surprisingly, sorted by
the next DTM node handle available form the heap node.
After a DTM node is pulled from the heap node that's at the top of the heap, the heap node is advanced to the next DTM node handle it makes available, and the heap nature of the heap is restored to ensure the next DTM node handle pulled is next in document order overall.
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | MultiValuedNodeHeapIterator.
An abstract representation of a set of nodes that will be retrieved in document order. |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private MultiValuedNodeHeapIterator. | |
| private int | |
| private int | |
| private int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| _cachedHeapSize | back to summary |
|---|---|
| private int _cachedHeapSize | |
| _cachedReturnedLast | back to summary |
|---|---|
| private int _cachedReturnedLast | |
| _free | back to summary |
|---|---|
| private int _free | |
| _heap | back to summary |
|---|---|
| private MultiValuedNodeHeapIterator. | |
| _heapSize | back to summary |
|---|---|
| private int _heapSize | |
| _returnedLast | back to summary |
|---|---|
| private int _returnedLast | |
| _size | back to summary |
|---|---|
| private int _size | |
| InitSize | back to summary |
|---|---|
| private static final int InitSize | |
| MultiValuedNodeHeapIterator | back to summary |
|---|---|
| public MultiValuedNodeHeapIterator() | |
| addHeapNode | back to summary |
|---|---|
| protected void addHeapNode(MultiValuedNodeHeapIterator. | |
| cloneIterator | back to summary |
|---|---|
| public DTMAxisIterator cloneIterator() Overrides com. Implements com. Doc from com. Returns a deep copy of this iterator. Cloned iterators may not be restartable. The iterator being cloned may or may not become non-restartable as a side effect of this operation. | |
| gotoMark | back to summary |
|---|---|
| public void gotoMark() Implements com. Doc from com. Restores the current node remembered by setMark(). | |
| heapify | back to summary |
|---|---|
| private void heapify(int i) | |
| init | back to summary |
|---|---|
| protected void init() | |
| next | back to summary |
|---|---|
| public int next() Implements com. Doc from com. Get the next node in the iteration. | |
| reset | back to summary |
|---|---|
| public DTMAxisIterator reset() Overrides com. Implements com. Doc from com. Resets the iterator to the last start node. | |
| setMark | back to summary |
|---|---|
| public void setMark() Implements com. Doc from com. Remembers the current node for the next call to gotoMark(). | |
| setStartNode | back to summary |
|---|---|
| public DTMAxisIterator setStartNode(int node) Implements com. Doc from com. Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END. | |
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| protected int | |
| protected int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public MultiValuedNodeHeapIterator. | |
| public void | |
| public abstract boolean | Returns: true if and only if the current node for this
heap node is before the current node of the argument heap
node in document order.the heap node against which to compare heapNodePerforms a comparison of the two heap nodes |
| public abstract MultiValuedNodeHeapIterator. | |
| public void | |
| public abstract MultiValuedNodeHeapIterator. | setStartNode(int
The new context node node)Sets context with respect to which this heap node is evaluated. |
| public abstract int |
| _isStartSet | back to summary |
|---|---|
| protected boolean _isStartSet | |
| _markedNode | back to summary |
|---|---|
| protected int _markedNode | |
| _node | back to summary |
|---|---|
| protected int _node | |
| HeapNode | back to summary |
|---|---|
| public HeapNode() | |
| cloneHeapNode | back to summary |
|---|---|
| public MultiValuedNodeHeapIterator. Creates a deep copy of this
| |
| gotoMark | back to summary |
|---|---|
| public void gotoMark() Restores the current node remembered by | |
| isLessThan | back to summary |
|---|---|
| public abstract boolean isLessThan(MultiValuedNodeHeapIterator. Performs a comparison of the two heap nodes
| |
| reset | back to summary |
|---|---|
| public abstract MultiValuedNodeHeapIterator. Reset the heap node back to its beginning.
| |
| setMark | back to summary |
|---|---|
| public void setMark() Remembers the current node for the next call to | |
| setStartNode | back to summary |
|---|---|
| public abstract MultiValuedNodeHeapIterator. Sets context with respect to which this heap node is evaluated.
| |
| step | back to summary |
|---|---|
| public abstract int step() Advance to the next node represented by this
| |