E - The type of element managed by the collection.public abstract class SortableCollection<E> extends Collection<E> implements Sortable<E>
| Constructor and Description |
|---|
SortableCollection() |
| Modifier and Type | Method and Description |
|---|---|
static <E> SortableCollection<E> |
concatenate(SortableCollection<E> collection1,
SortableCollection<E> collection2)
This method returns a new collection that is the concatenation of this collection with
the specified collection.
|
void |
sortElements(java.util.Comparator<? super E> comparator)
This method sorts the elements in the collection using the default (merge) sorting
algorithm and the specified comparison function.
|
void |
sortElements(Sorter<E> sorter,
java.util.Comparator<? super E> comparator)
This method sorts the elements in the collection using the specified sorting
algorithm and the specified comparison function.
|
protected Sorter<E> |
sorter()
This method returns a sorter that can be used by any subclass to sort its elements.
|
addElements, addElements, containsAllElementsIn, containsAnyElementsIn, equals, hashCode, isEmpty, iterator, normalizedIndex, removeElements, removeElements, toArray, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateDefaultManipulatorcreateDefaultIterator, removeAllElementsgetNumberOfElements, isEmpty, iterator, toArrayaddElement, containsElement, removeElementpublic final void sortElements(java.util.Comparator<? super E> comparator)
SortablesortElements in interface Sortable<E>comparator - The desired comparison function.public final void sortElements(Sorter<E> sorter, java.util.Comparator<? super E> comparator)
SortablesortElements in interface Sortable<E>sorter - The desired sorting algorithm.comparator - The desired comparison function.public static <E> SortableCollection<E> concatenate(SortableCollection<E> collection1, SortableCollection<E> collection2)
E - The type of element contained in the collections.collection1 - The first collection to be concatenated.collection2 - The second collection to be concatenated.Copyright © 2014 Crater Dog Technologies(TM). All rights reserved.