edu.rice.cs.plt.collect
Class ListenerSet.Sink

java.lang.Object
  extended by edu.rice.cs.plt.collect.ListenerSet.Sink
Enclosing class:
ListenerSet<T>

public class ListenerSet.Sink
extends Object

A write-only view of the set. This interface ensures that clients act independently — a client with only a reference to a certain listener cannot view, remove, or run other listeners.


Constructor Summary
ListenerSet.Sink()
           
 
Method Summary
 boolean add(Runnable listener)
          Add the given listener to the set, wrapped with LambdaUtil.promote(Runnable).
 boolean add(Runnable1<? super T> listener)
          Add the given listener to the set.
 boolean addAll(Iterable<Runnable1<? super T>> addList)
          Add the given listeners to the set.
 boolean remove(Runnable1<? super T> listener)
          Remove the given listener from the set.
 boolean removeAll(Iterable<Runnable1<? super T>> removeList)
          Remove all of the given listeners from the set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerSet.Sink

public ListenerSet.Sink()
Method Detail

add

public boolean add(Runnable1<? super T> listener)
Add the given listener to the set.


add

public boolean add(Runnable listener)
Add the given listener to the set, wrapped with LambdaUtil.promote(Runnable).


addAll

public boolean addAll(Iterable<Runnable1<? super T>> addList)
Add the given listeners to the set.


remove

public boolean remove(Runnable1<? super T> listener)
Remove the given listener from the set.


removeAll

public boolean removeAll(Iterable<Runnable1<? super T>> removeList)
Remove all of the given listeners from the set.