org.modeshape.common.collection

## Class SequentialIterator<T>

- java.lang.Object
- - org.modeshape.common.collection.SequentialIterator<T>

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

      public class SequentialIterator<T>
      extends Object
      implements Iterator<T>

  An iterator that abstracts iterating over two other iterators.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SequentialIterator(Iterator<T> first, Iterator<T> second)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> SequentialIterator<T>` | `create(Iterator<T> first, Iterator<T> second)`
    `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

    - #### SequentialIterator

          public SequentialIterator(Iterator<T> first,
                            Iterator<T> second)

  - ### Method Detail

    - #### create

          public static <T> SequentialIterator<T> create(Iterator<T> first,
                                         Iterator<T> second)

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