/** * Returns the next preceding sibling. * * @return the next preceding sibling * * @throws NoSuchElementException if no preceding siblings remain * * @see java.util.Iterator#next() */ public Object next() throws NoSuchElementException { if ( ! hasNext() ) { throw new NoSuchElementException(); } Object obj = this.nextObj; if ( siblingIter.hasNext() ) { this.nextObj = siblingIter.next(); } else { this.nextObj = null; } return obj; }