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

Type Parameters:
T - the value type
C - the collection type
All Superinterfaces:
Iterable<T>, Observable<C>, ObservableValueCollection<T,C>, Observer<C>, Sensor, Value<C>
All Known Subinterfaces:
ValueList<T>, ValueSet<T>

public interface ValueCollection<T, C extends Collection<T>> extends Value<C>, ObservableValueCollection<T,C>

An observable wrapper for one or more values.

Thread Safety: Unlike Value, a ValueCollection can be modified from more than one thread. Each change is atomic, made and notified while holding the collection's lock, so changes take turns, none lost, notified in the order they were made. Reading the collection takes no lock, never waiting for a change being notified. Listeners run on the thread making the change, so a listener must not wait for another thread changing the same collection, which waits for it in turn. A link is not atomic across threads, so two linked collections changed from two threads at once can lose a change.

See Also: