de.dante.extex.scanner.stream.observer.string
Class OpenStringObserverList

java.lang.Object
  extended byde.dante.extex.scanner.stream.observer.string.OpenStringObserverList
All Implemented Interfaces:
OpenStringObserver

public final class OpenStringObserverList
extends java.lang.Object
implements OpenStringObserver

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

Version:
$Revision: 1.3 $
Author:
Gerd Neugebauer

Constructor Summary
OpenStringObserverList()
           
 
Method Summary
 void add(OpenStringObserver observer)
          Add an observer to the list.
static OpenStringObserver register(OpenStringObserver list, OpenStringObserver observer)
          Take a list and add an observer.
 void update(java.lang.CharSequence string)
          Invoke all observers on the list to inform them of the character sequence which has been opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenStringObserverList

public OpenStringObserverList()
Method Detail

register

public static OpenStringObserver register(OpenStringObserver list,
                                          OpenStringObserver 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(OpenStringObserver observer)
Add an observer to the list.

Parameters:
observer - the observer to add to the list

update

public void update(java.lang.CharSequence string)
Invoke all observers on the list to inform them of the character sequence which has been opened.

Specified by:
update in interface OpenStringObserver
Parameters:
string - the contents to be processed
See Also:
OpenStringObserver.update( java.lang.CharSequence)