E - The type of element managed by the collection.public abstract class SortableCollection<E> extends OpenCollection<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.
|
abstract craterdog.core.Manipulator<E> |
createManipulator()
This method creates a new default manipulator for the 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.
|
addElement, addElements, addElements, removeElement, removeElements, removeElementscontainsAll, containsAny, containsElement, getElement, getElements, getIndex, normalizedIndex, removeAllcompareTo, equals, hashCode, toArrayaddSerializableClass, addSerializableClass, addSerializableClass, copy, createMapper, fromString, fromString, toExposedString, toString, toString, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic void shuffleElements()
public void sortElements()
compareTo method. It provides an easy way
to sort a collection using its natural ordering.public void sortElements(java.util.Comparator<? super E> comparator)
comparator - The desired comparison function.public void sortElements(Sorter<E> sorter, java.util.Comparator<? super E> comparator)
sorter - The desired sorting algorithm.comparator - The desired comparison function.public abstract craterdog.core.Manipulator<E> createManipulator()
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 © 2016 Crater Dog Technologies(TM). All rights reserved.