Package: org.codehaus.groovy.util

## [Java] Class ListBufferedIterator<T>

- org.codehaus.groovy.util.ListBufferedIterator

- All Implemented Interfaces and Traits:
    BufferedIterator

      public class ListBufferedIterator<T>
      extends Object
      implements BufferedIterator

  An implementation for BufferedIterator wraps ListIterator. This version provides an implementation for remove().

  Since:
    2.5.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ListBufferedIterator(List<T> list)` Creates a buffered iterator that peeks into the supplied list.

  - ### 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 ListBufferedIterator(List<T> list)

      Creates a buffered iterator that peeks into the supplied list.

      Parameters:
        `list` - the list to iterate

  - ### 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}