Interface ObservableValueCollection<T, C extends Collection<T>>

Type Parameters:
T - the values type
C - 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.
  • Method Details

    • get

      C get()
      Specified by:
      get in interface Observable<T>
      Returns:
      the value
    • contains

      boolean contains(@Nullable T value)
      Returns true if this collection contains the specified element
      Parameters:
      value - the element
      Returns:
      true if this collection contains the specified element
    • containsAll

      boolean containsAll(Collection<? extends T> values)
      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

      boolean containsOnly(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 either
      Parameters:
      values - the elements to check
      Returns:
      true if this collection contains all the elements of the specified collection and no others
    • containsNone

      boolean containsNone(Collection<? extends T> values)
      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

      Optional<C> optional()
      Specified by:
      optional in interface Observable<T>
      Returns:
      the values or an empty Optional if the collection is empty.