de.dante.extex.interpreter.observer.pop
Class PopObserverList

java.lang.Object
  extended byde.dante.extex.interpreter.observer.pop.PopObserverList
All Implemented Interfaces:
PopObserver

public final class PopObserverList
extends java.lang.Object
implements PopObserver

This class provides a type-safe list of observers for the pop event.

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Constructor Summary
PopObserverList()
           
 
Method Summary
 void add(PopObserver observer)
          Add an observer to the list.
static PopObserver register(PopObserver list, PopObserver observer)
          Take a list and add an observer.
 void update(Token token)
          Invoke all observers on the list to inform them of the token to be poped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopObserverList

public PopObserverList()
Method Detail

register

public static PopObserver register(PopObserver list,
                                   PopObserver observer)
Take a list and add an observer. If the list is null then a new one is created.

Parameters:
list - the input list or null
observer - the observer to add
Returns:
the input list or a new one with the observer added

add

public void add(PopObserver observer)
Add an observer to the list.

Parameters:
observer - the observer to add to the list

update

public void update(Token token)
Invoke all observers on the list to inform them of the token to be poped.

Specified by:
update in interface PopObserver
Parameters:
token - the token to be poped