/** * Gets a list iterator over an object or primitive array. * <p> * This method will handle primitive arrays as well as object arrays. * The primitives will be wrapped in the appropriate wrapper class. * * @param array the array over which to iterate * @return a list iterator over the array * @throws IllegalArgumentException if the array is not an array * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object array) { return new ArrayListIterator(array); }
/** * Gets the next element from the array. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } this.lastItemIndex = this.index; return Array.get(this.array, this.index++); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }
/** * Gets a list iterator over the end part of an object or primitive array. * <p> * This method will handle primitive arrays as well as object arrays. * The primitives will be wrapped in the appropriate wrapper class. * * @param array the array over which to iterate * @param start the index to start iterating at * @return a list iterator over part of the array * @throws IllegalArgumentException if the array is not an array * @throws IndexOutOfBoundsException if start is less than zero * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object array, int start) { return new ArrayListIterator(array, start); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }
/** * Gets the next element from the array. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } this.lastItemIndex = this.index; return Array.get(this.array, this.index++); }
/** * Gets a list iterator over an object or primitive array. * <p> * This method will handle primitive arrays as well as object arrays. * The primitives will be wrapped in the appropriate wrapper class. * * @param array the array over which to iterate * @return a list iterator over the array * @throws IllegalArgumentException if the array is not an array * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object array) { return new ArrayListIterator(array); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }
/** * Gets the next element from the array. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } this.lastItemIndex = this.index; return Array.get(this.array, this.index++); }
/** * Gets a list iterator over the end part of an object or primitive array. * <p> * This method will handle primitive arrays as well as object arrays. * The primitives will be wrapped in the appropriate wrapper class. * * @param array the array over which to iterate * @param start the index to start iterating at * @return a list iterator over part of the array * @throws IllegalArgumentException if the array is not an array * @throws IndexOutOfBoundsException if start is less than zero * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object array, int start) { return new ArrayListIterator(array, start); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }
/** * Gets the next element from the array. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } this.lastItemIndex = this.index; return Array.get(this.array, this.index++); }
/** * Gets a list iterator over part of an object or primitive array. * <p> * This method will handle primitive arrays as well as object arrays. * The primitives will be wrapped in the appropriate wrapper class. * * @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 a list iterator over part of the array * @throws IllegalArgumentException if the array is not an array * @throws IndexOutOfBoundsException if array bounds are invalid * @throws IllegalArgumentException if end is before start * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object array, int start, int end) { return new ArrayListIterator(array, start, end); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }
/** * Gets the next element from the array. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } this.lastItemIndex = this.index; return Array.get(this.array, this.index++); }
/** * Gets a list iterator over part of an object or primitive array. * <p> * This method will handle primitive arrays as well as object arrays. * The primitives will be wrapped in the appropriate wrapper class. * * @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 a list iterator over part of the array * @throws IllegalArgumentException if the array is not an array * @throws IndexOutOfBoundsException if array bounds are invalid * @throws IllegalArgumentException if end is before start * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object array, int start, int end) { return new ArrayListIterator(array, start, end); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }
/** * Gets the next element from the array. * * @return the next element * @throws NoSuchElementException if there is no next element */ public Object next() { if (hasNext() == false) { throw new NoSuchElementException(); } this.lastItemIndex = this.index; return Array.get(this.array, this.index++); }
public Iterator makeFullIterator() { return new ArrayListIterator(testArray); }
/** * Gets the previous element from the array. * * @return the previous element * @throws NoSuchElementException if there is no previous element */ public Object previous() { if (hasPrevious() == false) { throw new NoSuchElementException(); } this.lastItemIndex = --this.index; return Array.get(this.array, this.index); }