Interface ObservableValueCollection<T, C extends Collection<T>>
- Type Parameters:
T- the values typeC- the collection type
- All Superinterfaces:
Iterable<T>, Observable<C>, Observer<C>, Sensor
- 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 observable collection of values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Observer
Observer.Builder<T,B> -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this collection contains the specified elementbooleancontainsAll(Collection<? extends T> values) Returns true if this collection contains all the elements of the specified collectionbooleancontainsNone(Collection<? extends T> values) Returns true if this collection contains none of the elements of the specified collectionbooleancontainsOnly(Collection<? extends T> values) Returns true if this collection contains all the elements of the specified collection and no others, regardless of their order and of how many times an element occurs in eitherget()booleanisEmpty()optional()intsize()Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface Observable
changed, getOrThrow, getOrThrow, is, isNot, isNull, isNullableMethods inherited from interface Observer
addConsumer, addWeakConsumer, observer, removeConsumer, removeWeakConsumer, sensor, when, whenMethods inherited from interface Sensor
addListener, addWeakListener, removeListener, removeWeakListener
-
Method Details
-
get
C get()- Specified by:
getin interfaceObservable<T>- Returns:
- the value
-
contains
-
containsAll
Returns true if this collection contains all the elements of the specified collection- Parameters:
values- the elements to check- Returns:
- true if this collection contains all the elements of the specified collection
-
containsOnly
Returns true if this collection contains all the elements of the specified collection and no others, regardless of their order and of how many times an element occurs in either- Parameters:
values- the elements to check- Returns:
- true if this collection contains all the elements of the specified collection and no others
-
containsNone
Returns true if this collection contains none of the elements of the specified collection- Parameters:
values- the elements to check- Returns:
- true if this collection contains none of the elements of the specified collection
-
isEmpty
boolean isEmpty()- Returns:
- true if this collection is empty
-
size
int size()- Returns:
- the number of elements in this collection
-
optional
- Specified by:
optionalin interfaceObservable<T>- Returns:
- the values or an empty Optional if the collection is empty.
-