|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A
- The type of aspect used by this observer.@Participant(value="Observer") public interface SequenceObserver<A>
A sequence observer is an object that is
notified
when the observable
sequence
it is attached to changes its aspect value.
Implementation notes:
Sequence observers do not employ parameterised types on
the sequence supplied to the notification method because the
same observer may be attached to several different types
of observable sequences.
Furthermore, the actual type of sequence supplied to the
notification method cannot be assumed
observable
, or even of the type
of sequence this observer was attached to; it might be adapted,
decorated, composite, or proxied. Hence, several other patterns
may be applied in the implementation of this interface.
Method Summary | |
---|---|
void |
sequenceEvent(Sequence<?> sequence,
A aspect)
Notification method that is invoked when the sequence supplied as sequence
has changed its state to state . |
Method Detail |
---|
void sequenceEvent(Sequence<?> sequence, A aspect)
sequence
supplied as sequence
has changed its state to state
.
The type of sequence is not defined; it cannot be assumed
observable
, or even of the type
this observer was attached to; it might be adapted, decorated,
composite, or proxied.
sequence
- This sequence; cannot be null.aspect
- The current (new) aspect; cannot be null.
NullPointerException
- If sequence
is null. Nullability
of aspect
is implementation dependent.
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |