This package provides utility routines for sorting and grouping.
Specifically, it contains a QuickSort implementation,
AtomicComparer objects that handle character and numeric comparisons, together
with the important
DocumentOrderIterator which iterates over a set of nodes in document
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.
Interface Summary Interface Description AtomicComparerInterface representing an object that can be used to compare two XPath atomic values for equality or for ordering. AtomicMatchKeyMarker interface to identify an object that acts as a surrogate for an atomic value, with the property that if two atomic values are equal under the XPath 'eq' operator, then their corresponding surrogates are equal under the Java equals() comparison (and by implication, they have equal hash codes). GroupIteratorA GroupIterator is an iterator that iterates over a sequence of groups. ItemOrderComparerA Comparer used for comparing nodes in document order, or items in merge order SortKeyEvaluatorCallback interface used to evaluate sort keys.
Class Summary Class Description AlphanumericCollatorA Comparer that treats strings as an alternating sequence of alpha parts and numeric parts. AtomicSortComparerAn AtomicComparer used for comparing atomic values of arbitrary item types. CalendarValueComparerA comparer specifically for comparing two date, time, or dateTime values CaseFirstCollatorA StringCollator that sorts lowercase before uppercase, or vice versa. CodepointCollatingComparerAn AtomicComparer used for comparing strings, untypedAtomic values, and URIs using the Unicode codepoint collation. CodepointCollatorA collating sequence that uses Unicode codepoint ordering CollatingAtomicComparerAn AtomicComparer used for comparing strings, untypedAtomic values, and URIs using a collation. CollationMatchKeyA match key for comparing strings under a collation. ComparableAtomicValueComparerA comparer for comparing two "ordinary" atomic values, where the values implement the Comparable interface and the equals() method with the appropriate XPath semantics. ConditionalSorterAn 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. DecimalSortComparerAn 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 items DescendingComparerA Comparer used for comparing descending keys. DocumentOrderIteratorDocumentOrderIterator 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. DocumentSorterA DocumentSorter is an expression that sorts a sequence of nodes into document order. DoubleSortComparerAn AtomicComparer used for sorting values that are known to be numeric. EmptyGreatestComparerA 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. EmptyIntIteratorAn iterator over a zero-length sequence of integers EqualityComparerA 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. GenericAtomicComparerAn AtomicComparer used for comparing atomic values of arbitrary item types. GlobalOrderComparerA Comparer used for comparing nodes in document order. GroupAdjacentIteratorA GroupAdjacentIterator iterates over a sequence of groups defined by xsl:for-each-group group-adjacent="x". GroupByIteratorA GroupByIterator iterates over a sequence of groups defined by xsl:for-each-group group-by="x". GroupEndingIteratorA GroupEndingIterator iterates over a sequence of groups defined by xsl:for-each-group group-ending-with="x". GroupMatchingIteratorA GroupMatchingIterator contains code shared between GroupStartingIterator and GroupEndingIterator GroupStartingIteratorA GroupStartingIterator iterates over a sequence of groups defined by xsl:for-each-group group-starting-with="x". GroupToBeSortedThis class is a specialization of ObjectToBeSorted for use when the sequence being sorted is a sequence of groups. HTML5CaseBlindCollatorA collating sequence that compares strings according to the HTML5 rules for case-blind matching. ItemToBeSortedThis 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). ItemWithMergeKeysA class representing an item together with its merge keys and the name of the merge source object from which it derived, suitable for encapsulation as an ObjectValue. LocalOrderComparerA Comparer used for comparing nodes in document order. LRUCache<K,V>An LRU cache, based on
MergeGroupingIteratorAn iterator that groups the result of merging several xsl:merge input streams, identifying groups of adjacent items having the same merge key value MergeInstr MergeInstr.MergeKeyMappingFunctionMapping function for items encountered during the merge; the mapping function wraps the merged item and its merge keys into a single composite object MergeInstr.MergeSourceInner class representing one merge source MergeIteratorAn iterator representing the sorted merge of two merge inputs, retaining all duplicates. NumericComparerA Comparer used for comparing sort keys when data-type="number". NumericComparer11A Comparer used for comparing sort keys when data-type="number". ObjectToBeSorted<T>This class represents a member of a sequence that is being sorted. RuleBasedSubstringMatcherThis class wraps a RuleBasedCollator to provide a SubstringMatcher. SimpleCollationA simple collation that just wraps a supplied Comparator SortedGroupIteratorA SortedGroupIterator is a modified SortedIterator. SortedIteratorClass to do a sorted iteration SortExpressionExpression equivalent to the imaginary syntax expr sortby (sort-key)+ SortKeyDefinitionA SortKeyDefinition defines one component of a sort key. SortKeyDefinitionListThe class represents a list of sort key definitions in major-to-minor sort key order. TextComparerA Comparer used for comparing sort keys when data-type="text". UcaCollatorUsingJavaThis class implements (an approximation to) the UCA Collation Algorithm relying solely on the built-in Java support (that is, without using the ICU library). UntypedNumericComparerA specialist comparer that implements the rules for comparing an untypedAtomic value (always the first operand) to a numeric value (always the second operand)
Exception Summary Exception Description ComparisonExceptionA
ClassCastExceptionthat encapsulates an