question: public long next ( ) { long result = - 1l ; if ( cache < 0L && bufferElements > 0 ) { result = getNextFromBuffer ( ) ; bufferElements -- ; } else { result = cache ; cache = - 1L ; } if ( ! cs . isEmpty ( ) ) { long first = cs . first ( ) ; if ( result > first || result == - 1L ) { cs . remove ( first ) ; cache = result ; result = first ; } } if ( result == - 1L ) { throw new NoSuchElementException ( ) ; } Assert . check ( previous < result , EC . GENERAL ) ; previous = result ; readElements ++ ; return result ; }
target:  Returns the next element in the iteration.