org.zkoss.zk.ui.impl
Class ListenerIterator
java.lang.Object
org.zkoss.zk.ui.impl.ListenerIterator
- All Implemented Interfaces:
- java.util.Iterator
public class ListenerIterator
- extends java.lang.Object
- implements java.util.Iterator
Used to iterate the event listener.
It resolves a bug of LinkedList:
LinkedList's hasNext() and hasPrevious() don't check
concurrent-modification.
Thus, if the 2nd last listener is removed, hasNext() simply return
false (and the last listener is ignored) rather than throwing
ConcurrentModificationException. Refer to Bug 1730532.
- Author:
- tomyeh
Method Summary |
boolean |
hasNext()
|
java.lang.Object |
next()
|
void |
remove()
Removes the listener been interated (available since 3.6.3) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListenerIterator
public ListenerIterator(java.util.List list)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
remove
public void remove()
- Removes the listener been interated (available since 3.6.3)
- Specified by:
remove
in interface java.util.Iterator
Copyright © 2005-2009 Potix Corporation. All Rights Reserved.