|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the element type of this selection.public interface Selection<T extends PresentationModel>
The Selection
maintains a subset of the elements of a
IListPM
that are selected.
Please note: an index parameter always refers to the element's position inside the reference collection and not to the position inside the selection.
IListPM
Method Summary | |
---|---|
void |
addAll()
Change the selection to be equal the complete reference collection. |
boolean |
addInterval(int beginIndex,
int endIndex)
Change the selection to be the set union of the current selection and the elements with indices between beginIndex and
endIndex inclusive. |
boolean |
contains(int index)
Returns true if this the element at the specified index in
the related collection is selected. |
T |
getFirst()
Returns the first selected element in the reference collection. |
int[] |
getIndexes()
Returns the indexes of all selected elements in the reference collection. |
int[] |
getIndexes(int beginIndex,
int endIndex)
Returns the indexes of the selected elements with indices between beginIndex and endIndex inclusive. |
int |
getMaxIndex()
Returns the element index of the last selected element in the reference collection. |
int |
getMinIndex()
Returns the element index of the first selected element in the reference collection. |
boolean |
removeInterval(int beginIndex,
int endIndex)
Change the selection to be the set difference of the current selection and the elements with indices between beginIndex and endIndex inclusive. |
boolean |
setIndexes(int[] selIndices)
Change the selection to be the elements with the given indices. |
boolean |
setInterval(int beginIndex,
int endIndex)
Change the selection to be the elements with indices between beginIndex and endIndex inclusive. |
java.util.Collection<T> |
toCollection()
Returns a new Collection with all selected elements. |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
boolean contains(int index)
true
if this the element at the specified index in
the related collection is selected.
index
- the index to check
true
if this the element at the specified index in
the related collection is selectedboolean addInterval(int beginIndex, int endIndex)
beginIndex
and
endIndex
inclusive. beginIndex
must be less or
equal endIndex
.
beginIndex
- the index of the first element to selectendIndex
- the index of the last element to select (included in the
selection)
true
if this selection has been changedboolean setInterval(int beginIndex, int endIndex)
beginIndex
must be less or equal
endIndex
.
beginIndex
- the index of the first element to selectendIndex
- the index of the last element to select (included in the
selection)
true
if this selection has been changedboolean removeInterval(int beginIndex, int endIndex)
beginIndex
must be less or equal endIndex
.
beginIndex
- the index of the first element to unselectendIndex
- the index of the last element to unselect (excluded from
the selection)
true
if this selection has been changedint getMinIndex()
-1
if none is selectedint getMaxIndex()
-1
if none is selectedvoid addAll()
T getFirst()
getMinIndex()
int[] getIndexes()
int[] getIndexes(int beginIndex, int endIndex)
beginIndex
- endIndex
-
boolean setIndexes(int[] selIndices)
selIndices
- the indices of the elements to select
true
if this selection has been changedjava.util.Collection<T> toCollection()
Collection
with all selected elements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |