Example usage for org.apache.commons.collections.iterators ArrayIterator ArrayIterator

List of usage examples for org.apache.commons.collections.iterators ArrayIterator ArrayIterator

Introduction

In this page you can find the example usage for org.apache.commons.collections.iterators ArrayIterator ArrayIterator.

Prototype

public ArrayIterator(final Object array, final int startIndex, final int endIndex) 

Source Link

Document

Construct an ArrayIterator that will iterate over a range of values in the specified array.

Usage

From source file:org.apache.jackrabbit.spi.commons.iterator.Iterators.java

/**
 * Returns an iterator for elements of an array of <code>values</code>.
 *
 * @param <T>// w  w  w . j a  v  a2  s .  c o m
 * @param values  the array to iterate over.
 * @param from  the index to start iterating at.
 * @param to  the index to finish iterating at.
 * @return
 */
@SuppressWarnings("unchecked")
public static <T> Iterator<T> arrayIterator(T[] values, int from, int to) {
    return new ArrayIterator(values, from, to);
}