org.modeshape.common.collection

## Class SingleIterator<T>

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

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

      @NotThreadSafe
      public class SingleIterator<T>
      extends Object
      implements Iterator<T>

  An `Iterator` that is used to iterate over a single, fixed value.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingleIterator(T value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### SingleIterator

          public SingleIterator(T value)

  - ### Method Detail

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