Class EventListenerList.EventListenerIterator<T extends Event>
- java.lang.Object
-
- org.apache.commons.configuration2.event.EventListenerList.EventListenerIterator<T>
-
- Type Parameters:
T- the event type
- All Implemented Interfaces:
java.util.Iterator<EventListener<? super T>>
- Enclosing class:
- EventListenerList
public static final class EventListenerList.EventListenerIterator<T extends Event> extends java.lang.Object implements java.util.Iterator<EventListener<? super T>>
A specialIteratorimplementation used by thegetEventListenerIterator()method. This iterator returns only listeners compatible with a specified event type. It has a convenience method for invoking the current listener in the iteration with an event.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()voidinvokeNext(Event event)Obtains the next event listener in this iteration and invokes it with the given event object.EventListener<? super T>next()voidremove()This implementation always throws an exception.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public EventListener<? super T> next()
-
invokeNext
public void invokeNext(Event event)
Obtains the next event listener in this iteration and invokes it with the given event object.- Parameters:
event- the event object- Throws:
java.util.NoSuchElementException- if iteration is at its end
-
-