E
- the element type, as per Collection
C
- the change event message typepublic interface ObservableCollection<E,C>
extends java.util.Collection<E>
Observable
over itself, i.e. events will be triggered with the event
object being the collection itself. There is also an observable interface
changes()
over a type C
which is parameterisable by
subtypes, and which may contain further information about the nature of the
change.
Observable events should be triggered each time the collection is changed.
Many small internal sub-changes may be grouped into a single conceptual
change, and so only trigger once upon completion. The ordering of sub-changes
is generally considered an implementation detail in this case, and may not be
made available via the change event message type C
.
Event messages may only be valid during the invocation of the
Consumer.accept(Object)
method on observers, so references should
typically not be held beyond this point.
Modifier and Type | Method and Description |
---|---|
Observable<C> |
changes() |
Observable<? extends ObservableCollection<E,C>> |
invalidations() |
java.util.Collection<E> |
silent()
Get a view of the collection which can be mutated without triggering events.
|
ObservableCollection<E,?> |
synchronizedView() |
ObservableCollection<E,?> |
unmodifiableView() |
ObservableCollection<E,?> unmodifiableView()
ObservableCollection<E,?> synchronizedView()
Observable<? extends ObservableCollection<E,C>> invalidations()
Observable<C> changes()
java.util.Collection<E> silent()