/** * Returns the single element in this iterator if it has not yet * been seen. * * @return the next element in this iterator * * @throws NoSuchElementException if the element has already been seen * * @see java.util.Iterator#next() */ public Object next() { if ( hasNext() ) { this.seen = true; return this.object; } throw new NoSuchElementException(); }