gnu.xquery.util

Class OrderedTuples

public class OrderedTuples extends FilterConsumer

Helper class used in conjunction with {@link OrderedMap}. It has the tuples from the {@code for} and {@code let}-clauses, as filtered by the {@code where}-clause. The tuples are sorted using a linked-list version of merge sort. The sequence of n tuples for m variables is represented using an array of length n where each element is an array of length m. A possible future optimization would be to instead use m different arrays of of length n. The advantage is that each of the M arrays could have the "correct" type for each variable, and so we avoid casts or boxing/unboxing.
Method Summary
static OrderedTuplesmake$V(Procedure body, Object[] comps)
voidrun$X(CallContext ctx)
voidwriteObject(Object v)

Method Detail

make$V

public static OrderedTuples make$V(Procedure body, Object[] comps)

run$X

public void run$X(CallContext ctx)

writeObject

public void writeObject(Object v)