| |
|
| java.lang.Object org.apache.commons.collections.iterators.ObjectArrayIterator org.apache.commons.collections.iterators.ObjectArrayListIterator
Field Summary | |
protected int | lastItemIndex Holds the index of the last item returned by a call to next()
or previous() . |
Constructor Summary | |
public | ObjectArrayListIterator() Constructor for use with setArray . | public | ObjectArrayListIterator(Object[] array) Constructs an ObjectArrayListIterator that will iterate over the values in the
specified array. | public | ObjectArrayListIterator(Object[] array, int start) Constructs an ObjectArrayListIterator that will iterate over the values in the
specified array from a specific start index. | public | ObjectArrayListIterator(Object[] array, int start, int end) Construct an ObjectArrayListIterator that will iterate over a range of values
in the specified array. |
lastItemIndex | protected int lastItemIndex(Code) | | Holds the index of the last item returned by a call to next()
or previous() . This is set to -1 if neither method
has yet been invoked. lastItemIndex is used to to implement the
ObjectArrayListIterator.set method.
|
ObjectArrayListIterator | public ObjectArrayListIterator()(Code) | | Constructor for use with setArray .
Using this constructor, the iterator is equivalent to an empty iterator
until
ObjectArrayListIterator.setArray is called to establish the array to iterate over.
|
ObjectArrayListIterator | public ObjectArrayListIterator(Object[] array)(Code) | | Constructs an ObjectArrayListIterator that will iterate over the values in the
specified array.
Parameters: array - the array to iterate over throws: NullPointerException - if array is null |
ObjectArrayListIterator | public ObjectArrayListIterator(Object[] array, int start)(Code) | | Constructs an ObjectArrayListIterator that will iterate over the values in the
specified array from a specific start index.
Parameters: array - the array to iterate over Parameters: start - the index to start iterating at throws: NullPointerException - if array is null throws: IndexOutOfBoundsException - if the start index is out of bounds |
ObjectArrayListIterator | public ObjectArrayListIterator(Object[] array, int start, int end)(Code) | | Construct an ObjectArrayListIterator that will iterate over a range of values
in the specified array.
Parameters: array - the array to iterate over Parameters: start - the index to start iterating at Parameters: end - the index (exclusive) to finish iterating at throws: IndexOutOfBoundsException - if the start or end index is out of bounds throws: IllegalArgumentException - if end index is before the start throws: NullPointerException - if array is null |
hasPrevious | public boolean hasPrevious()(Code) | | Returns true if there are previous elements to return from the array.
true if there is a previous element to return |
nextIndex | public int nextIndex()(Code) | | Gets the next index to be retrieved.
the index of the item to be retrieved next |
reset | public void reset()(Code) | | Resets the iterator back to the start index.
|
|
|
|