Modifier and Type | Method and Description |
---|---|
SortLevel |
add(int columnRowIndex)
Adds a new
SortLevel applied to a column (or a row, if SortState.isLeftToRight() is true ) with the specified index into the SortLevelCollection . |
SortLevel |
add(int index,
int columnRowIndex)
Inserts a new
SortLevel applied to a column (or a row, if SortState.isLeftToRight() is true ) with the specified index into the SortLevelCollection at the specified index. |
void |
clear()
Removes all
SortLevel s from the SortLevelCollection . |
SortLevel |
get(int index)
Gets the
SortLevel at the specified index. |
SortLevel |
getByColumnRowIndex(int columnRowIndex)
Gets the sort level applied to a column (or a row, if
SortState.isLeftToRight() is true ) with the specified index (relative to the range ) or null if such sort level doesn't exist. |
Iterator<SortLevel> |
iterator()
Returns an iterator that iterates through the sort levels.
|
void |
move(int oldIndex,
int newIndex)
Moves the
SortLevel at the specified index to a new location in the SortLevelCollection . |
void |
remove(int index)
Removes the
SortLevel at the specified index of the SortLevelCollection . |
boolean |
remove(SortLevel sortLevel)
Removes the specific
SortLevel from the SortLevelCollection . |
boolean |
removeByColumnRowIndex(int columnRowIndex)
Removes a
SortLevel applied to a column (or a row, if SortState.isLeftToRight() is true ) with the specified index from the SortLevelCollection . |
int |
size()
Gets the number of sort levels actually contained in the
SortLevelCollection . |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SortLevel add(int columnRowIndex)
SortLevel
applied to a column (or a row, if SortState.isLeftToRight()
is true
) with the specified index into the SortLevelCollection
.columnRowIndex
- Index of the column (or the row, if SortState.isLeftToRight()
is true
) relative to the range
that an added SortLevel
applies to.SortLevel
applied to a column (or a row, if SortState.isLeftToRight()
is true
) with the specified index relative to the range
.IndexOutOfBoundsException
- columnRowIndex
is less than zero or is equal to or greater than width
(or height
, if SortState.isLeftToRight()
is true
) of the range
.IllegalArgumentException
- Column/row at the specified index is being sorted by the same criteria more than once. Delete the duplicate sort criteria and try again.public SortLevel add(int index, int columnRowIndex)
SortLevel
applied to a column (or a row, if SortState.isLeftToRight()
is true
) with the specified index into the SortLevelCollection
at the specified index.index
- The zero-based index at which new SortLevel
should be inserted.columnRowIndex
- Index of the column (or the row, if SortState.isLeftToRight()
is true
) relative to the range
that an inserted SortLevel
applies to.SortLevel
applied to a column (or a row, if SortState.isLeftToRight()
is true
) with the specified index relative to the range
.IndexOutOfBoundsException
- index
is less than zero or is equal to or greater than size()
.IndexOutOfBoundsException
- columnRowIndex
is less than zero or is equal to or greater than width
(or height
, if SortState.isLeftToRight()
is true
) of the range
.IllegalArgumentException
- Column/row at the specified index is being sorted by the same criteria more than once. Delete the duplicate sort criteria and try again.public void clear()
SortLevel
s from the SortLevelCollection
.public SortLevel get(int index)
SortLevel
at the specified index.index
- The zero-based index of the SortLevel
to get.SortLevel
at the specified index.IndexOutOfBoundsException
- index
is less than zero or is equal to or greater than size()
.public SortLevel getByColumnRowIndex(int columnRowIndex)
SortState.isLeftToRight()
is true
) with the specified index (relative to the range
) or null
if such sort level doesn't exist.columnRowIndex
- The index of a column (or a row, if SortState.isLeftToRight()
is true
) relative to the range
that a returned SortLevel
applies to.SortState.isLeftToRight()
is true
) with the specified index (relative to the range
) or null
if such sort level doesn't exist.public Iterator<SortLevel> iterator()
public void move(int oldIndex, int newIndex)
SortLevel
at the specified index to a new location in the SortLevelCollection
.oldIndex
- The zero-based index specifying the location of the SortLevel
to be moved.newIndex
- The zero-based index specifying the new location of the SortLevel
.IndexOutOfBoundsException
- oldIndex
is less than zero or is equal to or greater than size()
.IndexOutOfBoundsException
- newIndex
is less than zero or is equal to or greater than size()
.public void remove(int index)
SortLevel
at the specified index of the SortLevelCollection
.index
- The zero-based index of the SortLevel
to remove.IndexOutOfBoundsException
- index
is less than zero or is equal to or greater than size()
.public boolean remove(SortLevel sortLevel)
SortLevel
from the SortLevelCollection
.sortLevel
- The SortLevel
to remove from the SortLevelCollection
.true
if SortLevel
is successfully removed; otherwise, false
. This method also returns false
if SortLevel
was null
or was not found in the original SortLevelCollection
.public boolean removeByColumnRowIndex(int columnRowIndex)
SortLevel
applied to a column (or a row, if SortState.isLeftToRight()
is true
) with the specified index from the SortLevelCollection
.columnRowIndex
- Index of the column (or the row, if SortState.isLeftToRight()
is true
) relative to the range
that a removed SortLevel
applies to.true
if SortLevel
is successfully removed; otherwise, false
. This method also returns false
if SortLevel
with the specified column/row index was not found in the original SortLevelCollection
.public int size()
SortLevelCollection
.SortLevelCollection
.© GemBox Ltd. — All rights reserved.