Package groovy.util

# Interface BufferedIterator<T>

All Superinterfaces:
  `Iterator<T>`

All Known Implementing Classes:
  `IteratorBufferedIterator`, `ListBufferedIterator`

public interface BufferedIterator<T> extends Iterator<T>
An iterator that allows examining the next element without consuming it.

Since:
  2.5.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `head()`
  Returns the next element without advancing the iterator.

  ### Methods inherited from interface java.util.Iterator

  `forEachRemaining, hasNext, next, remove`

- ## Method Details

  - ### head

    T head()
    Returns the next element without advancing the iterator.
    Returns:
      the next element