public class Sort extends Object implements Iterable<Map.Entry<String,Sort.Order>>
Use:
table.sortOn(first("Year", DESCEND).next("State", ASCEND));
This sorts table on the column named year in descending order, such that the most recent years appear first, then on State, in ascending order so "AL" will appear before "CA". You can add additional instructions for multi-column sorts by chaining additional calls to next() with the appropriate column names and Order.
Modifier and Type | Class and Description |
---|---|
static class |
Sort.Order |
Constructor and Description |
---|
Sort(String columnName,
Sort.Order order) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty() |
Iterator<Map.Entry<String,Sort.Order>> |
iterator()
Returns an iterator over elements of type
T . |
Sort |
next(String columnName,
Sort.Order order) |
static Sort |
on(String columnName,
Sort.Order order) |
int |
size() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Sort(String columnName, Sort.Order order)
public static Sort on(String columnName, Sort.Order order)
public Sort next(String columnName, Sort.Order order)
public boolean isEmpty()
public int size()
public Iterator<Map.Entry<String,Sort.Order>> iterator()
T
.iterator
in interface Iterable<Map.Entry<String,Sort.Order>>
Copyright © 2017. All rights reserved.