Class ArrayIterator

java.lang.Object
org.stringtemplate.v4.misc.ArrayIterator
All Implemented Interfaces:
Iterator<Object>

public class ArrayIterator extends Object implements Iterator<Object>
Iterator for an array so I don't have to copy the array to a List just to make it implement Iterator.
  • Field Details

    • i

      protected int i
      Index into the data array
    • array

      protected Object array
    • n

      protected int n
      Arrays are fixed size; precompute.
  • Constructor Details

    • ArrayIterator

      public ArrayIterator(Object array)
  • Method Details