Package org.apache.commons.net.util

# Class ListenerList

java.lang.Object
org.apache.commons.net.util.ListenerList

All Implemented Interfaces:
  `Serializable`, `Iterable<EventListener>`

public class ListenerList extends Object implements Serializable, Iterable<EventListener>

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ListenerList()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addListener(EventListener listener)`
  `int`
  `getListenerCount()`
  `Iterator<EventListener>`
  `iterator()`
  Return an `Iterator` for the `EventListener` instances.
  `void`
  `removeListener(EventListener listener)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## Constructor Details

  - ### ListenerList

    public ListenerList()

- ## Method Details

  - ### addListener

    public void addListener(EventListener listener)

  - ### getListenerCount

    public int getListenerCount()

  - ### iterator

    public Iterator<EventListener> iterator()
    Return an `Iterator` for the `EventListener` instances.
    Specified by:
      `iterator` in interface `Iterable<EventListener>`
    Returns:
      an `Iterator` for the `EventListener` instances
    Since:
      2.0 TODO Check that this is a good defensive strategy

  - ### removeListener

    public void removeListener(EventListener listener)