cascading.util

## Class SingleValueIterator<Value>

- java.lang.Object
- - cascading.util.SingleValueIterator<Value>

- All Implemented Interfaces:
    Iterator<Value>
  Direct Known Subclasses:
    ForeverValueIterator, SingleValueCloseableIterator

      public class SingleValueIterator<Value>
      extends Object
      implements Iterator<Value>

  Class SingleValueIterator is a convenience to creating an `Iterator` that returns one value for use with interfaces that only accept Iterator instances.

  If given a `null` value, it will be assumed this Iterator instance has no value, and `hasNext()` will return false.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SingleValueIterator` | `EMPTY`
    `protected Value` | `value`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingleValueIterator()`
    `SingleValueIterator(Value value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `Value` | `next()`
    `void` | `remove()`
    `void` | `reset(Value value)`

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

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

- - ### Field Detail

    - #### EMPTY

          public static final SingleValueIterator EMPTY

    - #### value

          protected Value value

  - ### Constructor Detail

    - #### SingleValueIterator

          public SingleValueIterator()

    - #### SingleValueIterator

          public SingleValueIterator(Value value)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

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

    - #### next

          public Value next()

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

    - #### remove

          public void remove()

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

    - #### reset

          public void reset(Value value)

Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.