/** * @return the next element that will be returned from {@link #next()} without * actually advancing the iterator */ public T peek() { if ( hasFetchedNext ) { return nextObject; } nextObject = fetchNextOrNull(); hasFetchedNext = true; return nextObject; }
/** * @return the next element that will be returned from {@link #next()} without * actually advancing the iterator */ public T peek() { if ( hasFetchedNext ) { return nextObject; } nextObject = fetchNextOrNull(); hasFetchedNext = true; return nextObject; }