CollectionUtil
Methods for manipulating (sorting) and creating collections. Sort methods work directly on the supplied lists and don't copy to/from arrays before/after. For medium size collections as used in the Lucene indexer that is much more efficient.
Functions
Sorts the given random access List in natural order. The list must implement [ ]. This method uses the intro sort algorithm, but falls back to insertion sort for small lists.
Sorts the given random access List using the Comparator. The list must implement RandomAccess. This method uses the intro sort algorithm, but falls back to insertion sort for small lists.
Returns a new HashMap sized to contain size items without resizing the internal array.
Returns a new HashSet sized to contain size items without resizing the internal array.
Sorts the given random access List in natural order. The list must implement [ ]. This method uses the Tim sort algorithm, but falls back to binary sort for small lists.
Sorts the given random access List using the Comparator. The list must implement RandomAccess. This method uses the Tim sort algorithm, but falls back to binary sort for small lists.