Module is.codion.common.model
Package is.codion.common.model.selection
Interface MultiSelection.Indexes
- Enclosing interface:
MultiSelection<T>
Manages the selected indexes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.value.Value
Value.Builder<T,
B extends Value.Builder<T, B>>, Value.BuilderFactory, Value.Notify, Value.Validator<T> -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int index) Adds the given index to the selected indexesvoid
add
(Collection<Integer> indexes) Adds the given indexes to the selectionboolean
contains
(int index) void
Decrements all selected indexes by one, with wrap-around.void
Increments all selected indexes by one, with wrap-around.void
remove
(int index) Removes the given index from the selectionvoid
remove
(Collection<Integer> indexes) Removes the given indexes from the selectionMethods inherited from interface is.codion.common.observable.Observable
addConsumer, addListener, addWeakConsumer, addWeakListener, get, getOrThrow, getOrThrow, isEqualTo, isNotEqualTo, isNull, isNullable, observer, optional, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
Methods inherited from interface is.codion.common.value.Value
addValidator, clear, link, link, map, observable, removeValidator, set, unlink, unlink, validate
-
Method Details
-
add
void add(int index) Adds the given index to the selected indexes- Parameters:
index
- the index
-
remove
void remove(int index) Removes the given index from the selection- Parameters:
index
- the index
-
add
Adds the given indexes to the selection- Parameters:
indexes
- the indexes to add to the selection
-
remove
Removes the given indexes from the selection- Parameters:
indexes
- the indexes
-
contains
boolean contains(int index) - Parameters:
index
- the index- Returns:
- true if the given index is selected
-
increment
void increment()Increments all selected indexes by one, with wrap-around. If the selection is empty the lowest available index is selected. -
decrement
void decrement()Decrements all selected indexes by one, with wrap-around. If the selection is empty the highest available index is selected.
-