Interface MultiSelection.Indexes
- All Superinterfaces:
Observable<List<Integer>>,Observer<List<Integer>>,Sensor,Value<List<Integer>>
- Enclosing interface:
MultiSelection<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.reactive.value.Value
Value.Builder<T,B extends Value.Builder<T, B>>, Value.BuilderFactory, Value.Locked, Value.Notify, Value.Validator<T> -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index) Adds the given index to the selected indexesvoidadd(Collection<Integer> indexes) Adds the given indexes to the selectionadded()Notified with the indexes added to the selection, ascending, whatever added them, a view sharing theMultiSelection.IndexStoreincluded.booleancontains(int index) voidDecrements all selected indexes by one, with wrap-around.get()voidIncrements all selected indexes by one, with wrap-around.voidremove(int index) Removes the given index from the selectionvoidremove(Collection<Integer> indexes) Removes the given indexes from the selectionremoved()Notified with the indexes removed from the selection, ascending, whatever removed them, a view sharing theMultiSelection.IndexStoreincluded.Methods inherited from interface is.codion.common.reactive.observable.Observable
changed, getOrThrow, getOrThrow, is, isNot, isNull, isNullable, optionalMethods inherited from interface is.codion.common.reactive.observer.Observer
addConsumer, addWeakConsumer, observer, removeConsumer, removeWeakConsumer, sensor, when, whenMethods inherited from interface is.codion.common.reactive.sensor.Sensor
addListener, addWeakListener, removeListener, removeWeakListenerMethods inherited from interface is.codion.common.reactive.value.Value
addValidator, clear, link, link, locked, observable, removeValidator, set, unlink, unlink, update, validate
-
Method Details
-
get
- Specified by:
getin interfaceObservable<List<Integer>>- Returns:
- the value
-
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. -
added
Notified with the indexes added to the selection, ascending, whatever added them, a view sharing the
MultiSelection.IndexStoreincluded. Notified along with this value, after it, so only when the indexes change, and once a group of changes has ended, with its net change, seeMultiSelection.grouping().An index is a position, not an item: a change moving a selected item to another index, a sort or an item inserted before it, adds the new index and removes the previous one, the item still selected.
- Returns:
- an
Observernotified with the indexes added to the selection - See Also:
-
removed
Notified with the indexes removed from the selection, ascending, whatever removed them, a view sharing the
MultiSelection.IndexStoreincluded. Notified along with this value, after it, so only when the indexes change, and once a group of changes has ended, with its net change, seeMultiSelection.grouping().- Returns:
- an
Observernotified with the indexes removed from the selection - See Also:
-