net.sf.saxon.sort
Class SortedTupleIterator
java.lang.Object
net.sf.saxon.sort.SortedIterator
net.sf.saxon.sort.SortedTupleIterator
- All Implemented Interfaces:
- LastPositionFinder, LookaheadIterator, SequenceIterator, Sortable
public class SortedTupleIterator
- extends SortedIterator
A SortedTupleIterator is a modified SortedIterator. Whereas the sorted iterator
used by XSLT computes the sort key of each item in a sequence, using that item
as the context item, the SortedTupleIterator used by XQuery precomputes the sort
keys from scratch; they do not need to be a function of the item being sorted.
The items returned by the SortedTupleIterator are instance of ObjectValue,
which encapsulate a Value representing the contents of the tuple.
SortedTupleIterator
public SortedTupleIterator(XPathContext context,
SequenceIterator base,
AtomicComparer[] comparators)
- Create a sorted tuple iterator
- Parameters:
context
- the dynamic contextbase
- the base iterator, which returns the unsorted tuples. Each tuple is represented
by an ObjectValue which wraps an array of Value objects. The first Value object represents
the tuple itself. Subsequent Value objects represent the sort key values, in order.comparators
- the comparators used for comparing sort keys
Copyright (C) Michael H. Kay. All rights reserved.