org.modeshape.common.collection

## Class MultiIterator<E>

- java.lang.Object
- - org.modeshape.common.collection.MultiIterator<E>

- Type Parameters:
    `E` - the value type
  All Implemented Interfaces:
    Iterator<E>

      @NotThreadSafe
      public final class MultiIterator<E>
      extends Object
      implements Iterator<E>

  An iterator implementation that wraps multiple other iterators.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MultiIterator(Iterable<Iterator<E>> iterators)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <E> MultiIterator<E>` | `fromIterables(Iterable<? extends Iterable<E>> iterables)`
    `static <E> MultiIterator<E>` | `fromIterators(Iterable<Iterator<E>> iterators)`
    `boolean` | `hasNext()`
    `E` | `next()`
    `protected boolean` | `nextIterator()`
    `void` | `remove()`

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

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

- - ### Constructor Detail

    - #### MultiIterator

          protected MultiIterator(Iterable<Iterator<E>> iterators)

  - ### Method Detail

    - #### fromIterators

          public static <E> MultiIterator<E> fromIterators(Iterable<Iterator<E>> iterators)

    - #### fromIterables

          public static <E> MultiIterator<E> fromIterables(Iterable<? extends Iterable<E>> iterables)

    - #### hasNext

          public boolean hasNext()

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

    - #### next

          public E next()

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

    - #### nextIterator

          protected boolean nextIterator()

    - #### remove

          public void remove()

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

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