Package net.sf.saxon.expr.sort
package net.sf.saxon.expr.sort
This package provides utility routines for sorting and grouping. Specifically, it contains a QuickSort implementation, and some AtomicComparer objects that handle character and numeric comparisons, together with the important DocumentOrderIterator which iterates over a set of nodes in document order.
The package also contains the classes to support the implementation of the XSLT 2.0 instruction xsl:for-each-group, and some utilities for maintaining sets and maps whose keys are unboxed integer values.
Michael H. Kay
Saxonica Limited
29 November 2011
-
ClassDescriptionAbstract superclass containing helper methods for various implementations of IntSetA Comparer that treats strings as an alternating sequence of alpha parts and numeric parts.Interface representing an object that can be used to compare two XPath atomic values for equality or for ordering.An AtomicComparer used for comparing atomic values of arbitrary item types.A comparer specifically for comparing two date, time, or dateTime valuesA StringCollator that sorts lowercase before uppercase, or vice versa.An AtomicComparer used for comparing strings, untypedAtomic values, and URIs using the Unicode codepoint collation.A collating sequence that uses Unicode codepoint orderingAn AtomicComparer used for comparing strings, untypedAtomic values, and URIs using a collation.A comparer for comparing two "ordinary" atomic values, where the values implement the Comparable interface and the equals() method with the appropriate XPath semantics.An object used as a comparison key.An expression that sorts an underlying sequence into document order if some condition is true, or that returns the sequence "as is" (knowing that it doesn't need sorting) if the condition is false.An AtomicComparer used for sorting values that are known to be instances of xs:decimal (including xs:integer), It also supports a separate method for getting a collation key to test equality of itemsA Comparer used for comparing descending keys.DocumentOrderIterator takes as input an iteration of nodes in any order, and returns as output an iteration of the same nodes in document order, eliminating any duplicates.A DocumentSorter is an expression that sorts a sequence of nodes into document order.An AtomicComparer used for sorting values that are known to be numeric.A Comparer that modifies a base comparer by sorting empty key values and NaN values last (greatest), as opposed to the default which sorts them first.An iterator over a zero-length sequence of integersA comparer for comparing two atomic values where (a) equals is defined, and is implemented using the Java equals() method, and (b) ordering is not defined, and results in a dynamic error.An AtomicComparer used for comparing atomic values of arbitrary item types.Generically sorts arbitrary shaped data (for example multiple arrays, 1,2 or 3-d matrices, and so on) using a quicksort or mergesort.A Comparer used for comparing nodes in document order.A GroupAdjacentIterator iterates over a sequence of groups defined by xsl:for-each-group group-adjacent="x".A GroupByIterator iterates over a sequence of groups defined by xsl:for-each-group group-by="x".A GroupEndingIterator iterates over a sequence of groups defined by xsl:for-each-group group-ending-with="x".A GroupIterator is an iterator that iterates over a sequence of groups.A GroupMatchingIterator contains code shared between GroupStartingIterator and GroupEndingIteratorA GroupStartingIterator iterates over a sequence of groups defined by xsl:for-each-group group-starting-with="x".This class is a specialization of ObjectToBeSorted for use when the sequence being sorted is a sequence of groups.Set of int values.An immutable integer set containing all int values except those in an excluded setAn immutable integer set containing no integersIntHashMap<T>A hash table that maps int keys to Object values.Set of int values.An iterator over a sequence of unboxed int valuesSet of int values.A set of integers represented as int valuesAn immutable integer set containing a single integerAn implementation of
IntToIntMap
that relies on serial searching, and is therefore optimized for very small map sizesA hash table that maps int keys to int values.Interface defining a map from integers to integersAn immutable integer set containing every integerA Comparer used for comparing nodes in document order, or items in merge orderThis class is a specialization of class ObjectToBeSorted for use when the sequence being sorted is a sequence of items (including tuples, which are represented as items).A Comparer used for comparing nodes in document order.LRUCache<K,V> An LRU cache, based onLinkedHashMap
.A Comparer used for comparing sort keys when data-type="number".A Comparer used for comparing sort keys when data-type="number".This class represents a member of a sequence that is being sorted.This class wraps a RuleBasedCollator to provide a SubstringMatcher.A simple collation that just wraps a suppled ComparatorA Sortable is an object that can be sorted using the QuickSort method.A SortedGroupIterator is a modified SortedIterator.Class to do a sorted iterationExpression equivalent to the imaginary syntax expr sortby (sort-key)+A SortKeyDefinition defines one component of a sort key.Callback interface used to evaluate sort keys.A Comparer used for comparing sort keys when data-type="text".