/** * Gets an 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 an iterator over the array * @throws IllegalArgumentException if the array is not an array * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object array) { return new ArrayIterator(array); }
/** * Gets an 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 an iterator over part of the array * @throws IllegalArgumentException if the array is not an 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 ArrayIterator(array, start); }
/** * Gets an 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 an iterator over the array * @throws IllegalArgumentException if the array is not an array * @throws NullPointerException if array is null */ public static ResettableIterator arrayIterator(Object array) { return new ArrayIterator(array); }
/** * Gets an 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 an 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 ResettableIterator arrayIterator(Object array, int start, int end) { return new ArrayIterator(array, start, end); }
/** * Gets an 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 an 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 ResettableIterator arrayIterator(Object array, int start, int end) { return new ArrayIterator(array, start, end); }
/** * Gets an 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 an iterator over part of the array * @throws IllegalArgumentException if the array is not an 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 ArrayIterator(array, start); }
public Iterator makeFullIterator() { return new ArrayIterator(testArray); }
public ArrayIterator makeArrayIterator(Object array) { return new ArrayIterator(array); } public ArrayIterator makeArrayIterator(Object array, int index) {
public ArrayIterator makeArrayIterator(Object array, int index) { return new ArrayIterator(array, index); } public ArrayIterator makeArrayIterator(Object array, int start, int end) {
public ArrayIterator makeArrayIterator(Object array, int start, int end) { return new ArrayIterator(array, start, end); }
public Iterator makeEmptyIterator() { return new ArrayIterator(new int[0]); }
public Iterator makeEmptyIterator() { return new ArrayIterator(new Object[0]); }
public Iterator makeFullIterator() { return new ArrayIterator(testArray); }
/** * Returns an full iterator wrapped in a * FilterIterator that blocks all the elements * * @return "empty" FilterIterator */ public Iterator makeEmptyIterator() { return makeBlockAllFilter(new ArrayIterator(array)); }
return new ArrayIterator(obj);
return new ArrayIterator(obj);
public void testNullArray() { try { Iterator iter = new ArrayIterator(null); fail("Constructor should throw a NullPointerException when constructed with a null array"); } catch (NullPointerException e) { // expected } ArrayIterator iter = new ArrayIterator(); try { iter.setArray(null); fail("setArray(null) should throw a NullPointerException"); } catch (NullPointerException e) { // expected } }
data.folderIterator = new ArrayIterator( data.mailConn.getMessages() );
/** * * @see org.acegisecurity.afterinvocation.Filterer#iterator() */ public Iterator iterator() { return new ArrayIterator(list); }
/** * returns an iterator on all the enumerated instaces. * @return iterator */ public static Iterator iterator() { return new ArrayIterator(ALL); }