- Type Parameters:
O - The type of observers.
A - The type of aspect used by this sequence to notify observers.
E - The type of values delivered by this observable sequence.
- All Superinterfaces:
- Copyable<Sequence<E>>, Observable<O>, Sequence<E>, SequenceObserver<A>, StrictCopyable<Sequence<E>>, Stringable<Sequence<E>>
- All Known Subinterfaces:
- All Known Implementing Classes:
- AnnotatedObserversSequence, AnnotatedObserversSequenceDecorator, DateSequence, SequenceObserversSequence, SequenceObserversSequenceDecorator
public interface ObservableSequence<O,A,E>
- extends Observable<O>, Sequence<E>, SequenceObserver<A>
An observable sequence is a sequence that allows for
observers of the type supplied as the type parameter
O to be notified when the sequence changes its aspect.
The sequence aspect could for example the its internal state, and
the type of aspect is determined by the type parameter
Observers subscribe to all possible values of the sequence
aspect or none.
The notification of observers is performed by invoking the
method with this sequence as the first argument and the aspect
of this sequence as the second. This will normally be handled
by the implementing sequence itself, but how individual observers
are notified must be implemented by the sub-class as it is
dependent on the type of
The order in which observers are notified is undefined.
In case the type of observers is the
class ("the default"), the observable sequence in question is
will double as an observer as well: observable sequence
can add observable sequence
Y as an observer. The structure
becomes composite in a
depth-first manner because the
method can then be used to notify observers and to be
notified from other observable sequences.
This interface declares no new methods besides inherited
- Gunni Rode / rode.dk
- See Also:
Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!
The original thesis and source code are available at rode.dk/thesis.