Module is.codion.common.model
Package is.codion.common.model.selection
Interface MultiSelection.Items<R>
- Type Parameters:
R
- the item type
- All Superinterfaces:
Observable<List<R>>
,Observer<List<R>>
- Enclosing interface:
- MultiSelection<T>
Manages the the selected items.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Collection<R> items) Adds the given items to the selectionvoid
Adds the items passing the predicate test to the selectionvoid
Adds the given item to the selectionvoid
clear()
Clears the selectionboolean
get()
void
remove
(Collection<R> items) Remove the given items from the selectionvoid
Remove the given item from the selectionvoid
set
(Collection<R> items) void
Sets the items passing the predicate test as the selectionvoid
Methods inherited from interface is.codion.common.observable.Observable
addConsumer, addListener, addWeakConsumer, addWeakListener, getOrThrow, getOrThrow, isEqualTo, isNotEqualTo, isNull, isNullable, observer, optional, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
-
Method Details
-
get
- Specified by:
get
in interfaceObservable<R>
- Returns:
- the selected items or an empty list if the selection is empty
-
set
- Parameters:
items
- the items to select
-
set
- Parameters:
items
- the items to select
-
set
Sets the items passing the predicate test as the selection- Parameters:
predicate
- the predicate
-
add
Adds the items passing the predicate test to the selection- Parameters:
predicate
- the predicate
-
add
Adds the given item to the selection- Parameters:
item
- the item to add to the selection
-
add
Adds the given items to the selection- Parameters:
items
- the items to add to the selection
-
remove
Remove the given item from the selection- Parameters:
item
- the item to remove from the selection
-
remove
Remove the given items from the selection- Parameters:
items
- the items to remove from the selection
-
clear
void clear()Clears the selection -
contains
- Parameters:
item
- the item- Returns:
- true if the given item is selected
-