/** * Gets an iterator over an object array. * <p> * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use <code>new ArrayIterator(array)</code> for compatability. * * @param array the array over which to iterate * @return an iterator over the array * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object[] array) { return new ObjectArrayIterator(array); }
/** * Resets the iterator back to the start index. */ public void reset() { super.reset(); this.lastItemIndex = -1; }
/** * Returns the next element in the array. * * @return the next element in the array * @throws NoSuchElementException if all the elements in the array * have already been returned */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } return this.array[this.index++]; }
/** * Gets an iterator over an object array. * <p> * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use <code>new ArrayIterator(array)</code> for compatability. * * @param array the array over which to iterate * @return an iterator over the array * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object[] array) { return new ObjectArrayIterator(array); }
/** * Resets the iterator back to the start index. */ public void reset() { super.reset(); this.lastItemIndex = -1; }
/** * Returns the next element in the array. * * @return the next element in the array * @throws NoSuchElementException if all the elements in the array * have already been returned */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } return this.array[this.index++]; }
/** * Gets an iterator over the end part of an object array. * <p> * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use <code>new ArrayIterator(array,start)</code> for compatability. * * @param array the array over which to iterate * @param start the index to start iterating at * @return an iterator over part of the array * @throws IndexOutOfBoundsException if start is less than zero or greater * than the length of the array * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object[] array, int start) { return new ObjectArrayIterator(array, start); }
/** * Resets the iterator back to the start index. */ public void reset() { super.reset(); this.lastItemIndex = -1; }
/** * Returns the next element in the array. * * @return the next element in the array * @throws NoSuchElementException if all the elements in the array * have already been returned */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } return this.array[this.index++]; }
/** * Gets an iterator over part of an object array. * <p> * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use <code>new ArrayIterator(array,start,end)</code> for compatability. * * @param array the array over which to iterate * @param start the index to start iterating at * @param end the index to finish iterating at * @return an iterator over part of the array * @throws IndexOutOfBoundsException if array bounds are invalid * @throws IllegalArgumentException if end is before start * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object[] array, int start, int end) { return new ObjectArrayIterator(array, start, end); }
/** * Resets the iterator back to the start index. */ public void reset() { super.reset(); this.lastItemIndex = -1; }
/** * Returns the next element in the array. * * @return the next element in the array * @throws NoSuchElementException if all the elements in the array * have already been returned */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } return this.array[this.index++]; }
/** * Gets an iterator over the end part of an object array. * <p> * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use <code>new ArrayIterator(array,start)</code> for compatability. * * @param array the array over which to iterate * @param start the index to start iterating at * @return an iterator over part of the array * @throws IndexOutOfBoundsException if start is less than zero or greater * than the length of the array * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object[] array, int start) { return new ObjectArrayIterator(array, start); }
/** * Resets the iterator back to the start index. */ public void reset() { super.reset(); this.lastItemIndex = -1; }
/** * Returns the next element in the array. * * @return the next element in the array * @throws NoSuchElementException if all the elements in the array * have already been returned */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } return this.array[this.index++]; }
/** * Gets an iterator over part of an object array. * <p> * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use <code>new ArrayIterator(array,start,end)</code> for compatability. * * @param array the array over which to iterate * @param start the index to start iterating at * @param end the index to finish iterating at * @return an iterator over part of the array * @throws IndexOutOfBoundsException if array bounds are invalid * @throws IllegalArgumentException if end is before start * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object[] array, int start, int end) { return new ObjectArrayIterator(array, start, end); }
/** * Resets the iterator back to the start index. */ public void reset() { super.reset(); this.lastItemIndex = -1; }
/** * Returns the next element in the array. * * @return the next element in the array * @throws NoSuchElementException if all the elements in the array * have already been returned */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } return this.array[this.index++]; }
public ObjectArrayIterator makeArrayIterator() { return new ObjectArrayIterator(); }