Class EmptyIterator<E>

java.lang.Object
me.deecaad.core.mechanics.targeters.EmptyIterator<E>
Type Parameters:
E - the type of elements in the iterator
All Implemented Interfaces:
Iterator<E>

public final class EmptyIterator<E> extends Object implements Iterator<E>
An iterator that has no elements.

Do not use this class directly. Instead, use emptyIterator().

  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<E>
    • next

      public E next()
      Specified by:
      next in interface Iterator<E>
    • emptyIterator

      public static <T> EmptyIterator<T> emptyIterator()
      Returns an empty iterator.
      Type Parameters:
      T - the type of elements in the iterator
      Returns:
      an empty iterator