@NotThreadSafe public final class SortableColumn<V> extends ForwardingMap<Long,V> implements Column<V>, Sortable<V>
Column whose contents can be sorted using a Sorter.
In practice, a SortableColumn simply forwards to another
Column. When sort(Sorter) is called, the delegate is
replaced by a sorted version.
| Modifier and Type | Method and Description |
|---|---|
protected Map<Long,V> |
delegate() |
static <V> SortableColumn<Set<V>> |
multiValued(String key,
Map<Long,Set<V>> data)
Ensure that the
data is a SortableColumn. |
static <V> SortableColumn<V> |
singleValued(String key,
Map<Long,V> data)
Ensure that the
data is a SortableColumn. |
void |
sort(Sorter<V> sorter)
Sort this object using the
sorter |
void |
sort(Sorter<V> sorter,
long at)
Sort this object using the
sorter with the at timestamp
as a contextual reference. |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, valuesclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic static <V> SortableColumn<Set<V>> multiValued(String key, Map<Long,Set<V>> data)
data is a SortableColumn.key - data - data in the form of a SortableColumn.public static <V> SortableColumn<V> singleValued(String key, Map<Long,V> data)
data is a SortableColumn.key - data - data in the form of a SortableColumn.public void sort(Sorter<V> sorter)
Sortablesorterpublic void sort(Sorter<V> sorter, long at)
Sortablesorter with the at timestamp
as a contextual reference.