Class ConcurrentListenerSet<T>

java.lang.Object
generic.concurrent.ConcurrentListenerSet<T>
Type Parameters:
T - the type
All Implemented Interfaces:
Iterable<T>

public class ConcurrentListenerSet<T> extends Object implements Iterable<T>
A listener set that is weakly consistent. This allows for iteration of the set while other threads modify the set.
  • Constructor Details

    • ConcurrentListenerSet

      public ConcurrentListenerSet()
  • Method Details

    • add

      public void add(T t)
    • remove

      public void remove(T t)
    • clear

      public void clear()
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • asList

      public List<T> asList()
    • toString

      public String toString()
      Overrides:
      toString in class Object