Class ArrayIterator<T>

java.lang.Object
overit.geocall.util.ArrayIterator<T>
Type Parameters:
T - The type of elements returned by the iterator
All Implemented Interfaces:
Iterator

public class ArrayIterator<T> extends Object implements Iterator
This class is an implementation of the Iterator that allows to iterate over an Array collection of objects of any type.
  • Field Details

    • oo

      protected T[] oo
    • pos

      protected int pos
  • Constructor Details

    • ArrayIterator

      public ArrayIterator(T... oo)
      Creates a new ArrayIterator
      Parameters:
      oo - The objects that will fill the Iterator
  • Method Details

    • hasNext

      public boolean hasNext()
      Checks if the iterator has more elements.
      Specified by:
      hasNext in interface Iterator<T>
      Returns:
      true if the iteration has more elements, false otherwise
    • next

      public T next()
      Returns the next element in the iteration.
      Specified by:
      next in interface Iterator<T>
      Returns:
      The next element in the iteration
    • remove

      public void remove()
      Not supported. It throws a new UnsupportedOperationException
      Specified by:
      remove in interface Iterator<T>