Package: org.codehaus.groovy.util

## [Java] Class IteratorBufferedIterator<T>

- org.codehaus.groovy.util.IteratorBufferedIterator

- All Implemented Interfaces and Traits:
    BufferedIterator

      public class IteratorBufferedIterator<T>
      extends Object
      implements BufferedIterator

  An implementation for BufferedIterator wraps Iterator.

  Since:
    2.5.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `IteratorBufferedIterator(Iterator<T> iter)` Creates a buffered iterator that can peek into the supplied iterator.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `hasNext()` {@inheritDoc}
    `` | `public T` | `head()` Returns the next element without advancing the iterator. Returns: the next element
    `` | `public T` | `next()` {@inheritDoc}
    `` | `public void` | `remove()` {@inheritDoc}

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public IteratorBufferedIterator(Iterator<T> iter)

      Creates a buffered iterator that can peek into the supplied iterator.

      Parameters:
        `iter` - the iterator to wrap

  - ### Method Detail

    - #### public boolean hasNext()

      {@inheritDoc}

    - #### public T head()

      Returns the next element without advancing the iterator.

      Returns:
        the next element

    - #### public T next()

      {@inheritDoc}

    - #### public void remove()

      {@inheritDoc}