org.stringtemplate.v4.misc
Class ArrayIterator
java.lang.Object
org.stringtemplate.v4.misc.ArrayIterator
- All Implemented Interfaces:
- Iterator
public class ArrayIterator
- extends Object
- implements Iterator
Iterator for an array so I don't have to copy the array to a List
just to make it iteratable.
|
Field Summary |
protected Object |
array
|
protected int |
i
Index into the data array |
protected int |
n
Arrays are fixed size; precompute. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
i
protected int i
- Index into the data array
array
protected Object array
n
protected int n
- Arrays are fixed size; precompute.
ArrayIterator
public ArrayIterator(Object array)
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator
next
public Object next()
- Specified by:
next in interface Iterator
remove
public void remove()
- Specified by:
remove in interface Iterator
Copyright © 2011. All Rights Reserved.