/** * Returns the item the stream is currently pointing at. * <p> * This method does not change the internal state. Therefore it can be called several times and will always * return the same result. * * @return the item the stream is currently pointing at. */ public T current() { return next(0); }
/** * Returns the next item after the current one in the stream. * <p> * This method does not change the internal state. Therefore it can be called several times and will always * return the same result. * * @return the next item in the stream. This will be the current item, after a call to {@link #consume()} */ public T next() { return next(1); }
/** * Returns the item the stream is currently pointing at. * <p> * This method does not change the internal state. Therefore it can be called several times and will always * return the same result. * * @return the item the stream is currently pointing at. */ public T current() { return next(0); }
/** * Returns the next item after the current one in the stream. * <p> * This method does not change the internal state. Therefore it can be called several times and will always * return the same result. * * @return the next item in the stream. This will be the current item, after a call to {@link #consume()} */ public T next() { return next(1); }