Code example for Iterator

Methods: remove

0
     * After a removal, the remove method may not be called again until another 
     * next has been performed. If the {@link #reset} is called, then remove may 
     * not be called until {@link #next} is called again. 
     */ 
    public void remove() { 
        iterator.remove();
    } 
 
    /** 
     * Resets the iterator back to the start of the collection. 
     */ 
    public void reset() { 
        iterator = collection.iterator();
    } 
 
    /** 
     * Gets the size of the collection underlying the iterator. 
     * 
     * @return the current collection size 
     */ 
    public int size() {