public Iterator < E > iterator ( ) { final Iterator < ? extends E > itr = core . iterator ( ) ; return new Iterator < E > ( ) { private E last ; public boolean hasNext ( ) { return itr . hasNext ( ) ; } public E next ( ) { return last = itr . next ( ) ; } public void remove ( ) { CopyOnWriteList . this . remove ( last ) ; } } ; }
Returns an iterator .