Class AIndexedIterator<T>

java.lang.Object
org.openl.util.AOpenIterator<T>
org.openl.util.AIndexedIterator<T>
All Implemented Interfaces:
Iterator<T>, IOpenIterator<T>

public abstract class AIndexedIterator<T> extends AOpenIterator<T>
Author:
snshor
  • Constructor Details

    • AIndexedIterator

      protected AIndexedIterator(int from, int to, int step)
  • Method Details

    • fromArrayObj

      public static Iterator<Object> fromArrayObj(Object ary)
    • hasNext

      public final boolean hasNext()
    • indexedElement

      protected abstract T indexedElement(int i)
    • next

      public T next()
    • size

      public final int size()
      Description copied from class: AOpenIterator
      Calculates the remaining size of iterated collection without destroying itself(const in c++ terminology), -1 if it cannot be known in advance. Not every iterator is capable of doing it.
      Specified by:
      size in interface IOpenIterator<T>
      Overrides:
      size in class AOpenIterator<T>
      Returns:
      the number of elements left to iterate, or UNKNOWN_SIZE if it is not known, this method is "const"