public class ColumnSortList extends Object
Column
s in a table.
The 0th item is the ColumnSortList.ColumnSortInfo
of the most recently sorted
column.Modifier and Type | Class and Description |
---|---|
static class |
ColumnSortList.ColumnSortInfo
Information about the sort order of a specific column in a table.
|
static interface |
ColumnSortList.Delegate
The delegate that handles modifications to the list.
|
Constructor and Description |
---|
ColumnSortList()
Construct a new
ColumnSortList without a ColumnSortList.Delegate . |
ColumnSortList(ColumnSortList.Delegate delegate)
Construct a new
ColumnSortList with the specified ColumnSortList.Delegate . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all of the elements from this list.
|
boolean |
equals(Object obj)
Check if the specified object equals this list.
|
ColumnSortList.ColumnSortInfo |
get(int index)
Get the
ColumnSortList.ColumnSortInfo at the specified index. |
int |
getLimit()
Get the actual limit value
|
int |
hashCode() |
void |
insert(int index,
ColumnSortList.ColumnSortInfo sortInfo)
Inserts the specified
ColumnSortList.ColumnSortInfo at the specified position in
this list. |
ColumnSortList.ColumnSortInfo |
push(Column<?,?> column)
Push a
Column onto the list at index zero, setting ascending to
true. |
void |
push(ColumnSortList.ColumnSortInfo sortInfo)
Push a
ColumnSortList.ColumnSortInfo onto the list at index zero. |
boolean |
remove(ColumnSortList.ColumnSortInfo sortInfo)
Remove a
ColumnSortList.ColumnSortInfo from the list. |
void |
setLimit(int limit)
Set the limit to a positive value to prevent the growth of the infos list over the given size.
|
int |
size()
Get the size of the list.
|
public ColumnSortList()
ColumnSortList
without a ColumnSortList.Delegate
.public ColumnSortList(ColumnSortList.Delegate delegate)
ColumnSortList
with the specified ColumnSortList.Delegate
.delegate
- the ColumnSortList.Delegate
to inform of modificationspublic void clear()
public boolean equals(Object obj)
ColumnSortList
are equals if they are the same size, and all entries are
equals
and in the same order.public ColumnSortList.ColumnSortInfo get(int index)
ColumnSortList.ColumnSortInfo
at the specified index.index
- the indexColumnSortList.ColumnSortInfo
public int getLimit()
public void insert(int index, ColumnSortList.ColumnSortInfo sortInfo)
ColumnSortList.ColumnSortInfo
at the specified position in
this list. If the column already exists in the sort info, the index will be
adjusted to account for any removed entries.sortInfo
- the ColumnSortList.ColumnSortInfo
to addpublic ColumnSortList.ColumnSortInfo push(Column<?,?> column)
Column
onto the list at index zero, setting ascending to
true. If the column already exists, it will be removed from its current
position and placed at the start of the list. If the Column is already at
the start of the list, its ascending bit will be flipped (ascending to
descending and vice versa).column
- the Column
to pushColumnSortList.ColumnSortInfo
that was pushedpublic void push(ColumnSortList.ColumnSortInfo sortInfo)
ColumnSortList.ColumnSortInfo
onto the list at index zero. If the column
already exists, it will be removed from its current position and placed at
the start of the list.sortInfo
- the ColumnSortList.ColumnSortInfo
to pushpublic boolean remove(ColumnSortList.ColumnSortInfo sortInfo)
ColumnSortList.ColumnSortInfo
from the list.sortInfo
- the ColumnSortList.ColumnSortInfo
to removepublic void setLimit(int limit)
limit
- the new limit valuepublic int size()
ColumnSortList.ColumnSortInfo
in the listCopyright © 2016. All rights reserved.