/** * Gets a list iterator over an object array. * * @param array the array over which to iterate * @return a list iterator over the array * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object[] array) { return new ObjectArrayListIterator(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 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 this.array[this.index]; }
/** * Gets a list iterator over the end part of an object array. * * @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 IndexOutOfBoundsException if start is less than zero * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object[] array, int start) { return new ObjectArrayListIterator(array, start); }
/** * 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 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 this.array[this.index]; }
/** * Gets a list iterator over part of an object array. * * @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 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 ObjectArrayListIterator(array, start, end); }
/** * 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 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 this.array[this.index]; }
/** * Gets a list iterator over an object array. * * @param array the array over which to iterate * @return a list iterator over the array * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object[] array) { return new ObjectArrayListIterator(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 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 this.array[this.index]; }
/** * Gets a list iterator over the end part of an object array. * * @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 IndexOutOfBoundsException if start is less than zero * @throws NullPointerException if array is null */ public static ResettableListIterator arrayListIterator(Object[] array, int start) { return new ObjectArrayListIterator(array, start); }
/** * 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 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 this.array[this.index]; }
/** * Gets a list iterator over part of an object array. * * @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 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 ObjectArrayListIterator(array, start, end); }
/** * 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 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 this.array[this.index]; }
public Iterator makeEmptyIterator() { return new ObjectArrayListIterator(new Object[0]); }
/** * 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 this.array[this.index++]; }