com.fasterxml.aalto.util

## Class EmptyIterator<T>

- java.lang.Object
- - com.fasterxml.aalto.util.EmptyIterator<T>

- All Implemented Interfaces:
    Iterator<T>

      public final class EmptyIterator<T>
      extends Object
      implements Iterator<T>

  Simple implementation of "null iterator", iterator that has nothing to iterate over.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> EmptyIterator<T>` | `getInstance()` Since the actual type has no effect (as this iterator never returns any value objects), we can just cast away here: bit unclean, but safe.
    `boolean` | `hasNext()`
    `T` | `next()`
    `void` | `remove()`

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

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

- - ### Method Detail

    - #### getInstance

          public static <T> EmptyIterator<T> getInstance()

      Since the actual type has no effect (as this iterator never returns any value objects), we can just cast away here: bit unclean, but safe.

    - #### 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 © 2012-2015 FasterXML. All Rights Reserved.