public class Orderings extends ArrayList<Ordering>
Orderings is provided so that you can chain Ordering together and then use the result to pass into methods that require List<Ordering>
Example:
Person.COMPANY_NAME.asc().then(Person.FIRST_NAME.desc)
modCount
Constructor and Description |
---|
Orderings() |
Orderings(Collection<? extends Ordering> c) |
Orderings(int initialCapacity) |
Orderings(Ordering... orderings) |
Orderings(Ordering ordering) |
Modifier and Type | Method and Description |
---|---|
<T> List<T> |
orderedList(List<T> list)
Returns an list sorted with these Orderings.
|
<T> void |
orderList(List<T> list)
Sorts the given array with these Orderings.
|
Orderings |
then(List<Ordering> nextOrderings) |
Orderings |
then(Ordering nextOrdering)
Adds the given sort ordering to the end of this list and
returns "this" so it can be chained again.
|
Orderings |
then(Orderings nextOrderings)
Adds the given sort orderings to the end of this list and returns
"this" so it can be chained again.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public Orderings()
public Orderings(int initialCapacity)
public Orderings(Collection<? extends Ordering> c)
public Orderings(Ordering ordering)
public Orderings(Ordering... orderings)
public Orderings then(Ordering nextOrdering)
nextOrdering
- the sort ordering to addpublic Orderings then(Orderings nextOrderings)
nextOrderings
- the sort ordering to addpublic Orderings then(List<Ordering> nextOrderings)
nextOrderings
- the sort ordering to addthen(Orderings)
public <T> List<T> orderedList(List<T> list)
T
- the type of the listlist
- the list to sortpublic <T> void orderList(List<T> list)
T
- the type of the listlist
- the list to sortCopyright © 2001–2019 Apache Cayenne. All rights reserved.