org.extex.scanner.stream.observer.string
Class OpenStringObserverList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<OpenStringObserver>
              extended by org.extex.scanner.stream.observer.string.OpenStringObserverList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<OpenStringObserver>, java.util.Collection<OpenStringObserver>, java.util.List<OpenStringObserver>, java.util.RandomAccess, OpenStringObserver

public final class OpenStringObserverList
extends java.util.ArrayList<OpenStringObserver>
implements OpenStringObserver

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

Version:
$Revision: 4738 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OpenStringObserverList()
           
 
Method Summary
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.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

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

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)