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() doesn'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
| 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()
- Specified by:
remove in interface java.util.Iterator
Copyright © 2005-2007 Potix Corporation. All Rights Reserved.