E - The type of element managed by the collection.public abstract class SortableCollection<E> extends OpenCollection<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 |
shuffleElements()
This method shuffles the elements in the collection using a randomizing algorithm.
|
void |
sortElements()
This method sorts the elements in the collection using the default (merge) sorting
algorithm and the elements'
compareTo method. |
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.
|
addElements, addElements, removeElements, removeElementscompareTo, containsAllElementsIn, containsAnyElementsIn, containsElement, equals, hashCode, isEmpty, iterator, normalizedIndex, toArrayaddSerializableClass, addSerializableClass, copy, toExposedString, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateDefaultManipulatoraddElement, removeElementcreateDefaultIterator, getElementAtIndex, getElementsInRange, getIndexOfElement, removeAllElementsgetNumberOfElementspublic void shuffleElements()
SortableshuffleElements in interface Sortable<E>public void sortElements()
SortablecompareTo method. It provides an easy way
to sort a collection using its natural ordering.sortElements in interface Sortable<E>public void sortElements(java.util.Comparator<? super E> comparator)
SortablesortElements in interface Sortable<E>comparator - The desired comparison function.public 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 © 2015 Crater Dog Technologies(TM). All rights reserved.