|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.util.selection.ordering.SortedOrdering<E>
E
- The comparable type.public class SortedOrdering<E extends Comparable>
Apply a sorting operation to the provided list, ordering the list naturally from smallest to largest.
Constructor Summary | |
---|---|
SortedOrdering()
Create an new instance with the default ordering defined to be an ordering that enforces "natural ordering". |
|
SortedOrdering(Comparator<Selection.Entry<E>> comparator)
Create a new instance with the provided comparator as the
comparator to use. |
Method Summary | |
---|---|
boolean |
order(List<Selection.Entry<E>> elements)
Apply the ordering on the provided list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortedOrdering()
public SortedOrdering(Comparator<Selection.Entry<E>> comparator)
comparator
as the
comparator to use.
comparator
- The comparator to use.Method Detail |
---|
public boolean order(List<Selection.Entry<E>> elements)
Comparator
.
order
in interface Ordering<E extends Comparable>
elements
- The list to be ordered.
true
if successful, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |