Module is.codion.common.reactive
Package is.codion.common.reactive.value
Interface ObservableValueCollection<T,C extends Collection<T>>
- Type Parameters:
T- the values typeC- the collection type
- All Superinterfaces:
Iterable<T>,Observable<C>,Observer<C>
- All Known Subinterfaces:
ObservableValueList<T>,ObservableValueSet<T>,ValueCollection<T,,C> ValueList<T>,ValueSet<T>
public interface ObservableValueCollection<T,C extends Collection<T>>
extends Observable<C>, Iterable<T>
A read only values observable
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.reactive.observer.Observer
Observer.Builder<T,B extends Observer.Builder<T, B>> -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if thisValueCollectioninstance contains the specified elementbooleancontainsAll(Collection<T> values) Returns true if thisValueCollectioninstance contains all the elements of the specified collectionbooleancontainsNone(Collection<T> values) Returns true if thisValueCollectioninstance contains none of the elements of the specified collectionbooleancontainsOnly(Collection<T> values) Returns true if thisValueCollectioninstance contains only the elements of the specified collectionget()booleanisEmpty()optional()intsize()Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface is.codion.common.reactive.observer.Observable
getOrThrow, getOrThrow, is, isNot, isNull, isNullableMethods inherited from interface is.codion.common.reactive.observer.Observer
addConsumer, addListener, addWeakConsumer, addWeakListener, observer, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener, when, when
-
Method Details
-
get
- Specified by:
getin interfaceObservable<T>- Returns:
- the value
-
contains
Returns true if thisValueCollectioninstance contains the specified element- Parameters:
value- the element- Returns:
- true if this
ValueCollectioninstance contains the specified element
-
containsAll
Returns true if thisValueCollectioninstance contains all the elements of the specified collection- Parameters:
values- the elements to check- Returns:
- true if this
ValueCollectioninstance contains all the elements of the specified collection
-
containsOnly
Returns true if thisValueCollectioninstance contains only the elements of the specified collection- Parameters:
values- the elements to check- Returns:
- true if this
ValueCollectioninstance contains only the elements of the specified collection
-
containsNone
Returns true if thisValueCollectioninstance contains none of the elements of the specified collection- Parameters:
values- the elements to check- Returns:
- true if this
ValueCollectioninstance contains none of the elements of the specified collection
-
isEmpty
boolean isEmpty()- Returns:
- true if this
ValueCollectioninstance is empty
-
size
int size()- Returns:
- the number of elements in this
ValueCollectioninstance
-
optional
- Specified by:
optionalin interfaceObservable<T>- Returns:
- the values or an empty Optional if the collection is empty.
-