org.modeshape.common.collection

## Class DelegateIterator<T,V>

- java.lang.Object
- - org.modeshape.common.collection.DelegateIterator<T,V>

- Type Parameters:
    `T` - the iterator's type
    `V` - the type of the delegate iterator
  All Implemented Interfaces:
    Iterator<T>

      public class DelegateIterator<T,V>
      extends Object
      implements Iterator<T>

  An iterator that adapts the value returned by a delegate iterator.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DelegateIterator(Iterator<V> delegate, Function<V,T> converter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T,V> Iterator<T>` | `around(Iterator<V> delegate, Function<V,T> converter)`
    `boolean` | `hasNext()`
    `T` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DelegateIterator

          protected DelegateIterator(Iterator<V> delegate,
                          Function<V,T> converter)

  - ### Method Detail

    - #### around

          public static <T,V> Iterator<T> around(Iterator<V> delegate,
                                 Function<V,T> converter)

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<T>`

    - #### next

          public T next()

      Specified by:
        `next` in interface `Iterator<T>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<T>`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.