@Override public Iterator<JDA> iterator() { return new ArrayIterator<>(shards); }
@Nonnull @Override public Iterator<T> iterator() { return new ArrayIterator<>(elements.values()); }
@Override public Iterator<Atom> iterator() { return new ArrayIterator<>(terms); }
@Override public Iterator<Literal> iterator() { return new ArrayIterator<>(body); }
@Override public Iterator<Scheme> iterator() { return new ArrayIterator<>(terms); }
@Override public Iterator<Atom> iterator() { return new ArrayIterator<>(literals); }
@Override public Iterator<Answer> iterator() { return new ArrayIterator<>(answers); }
/** * 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 <E> the element type * @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 <E> ResettableIterator<E> arrayIterator(final Object array) { return new ArrayIterator<E>(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 <E> the element type * @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 <E> ResettableIterator<E> arrayIterator(final Object array, final int start) { return new ArrayIterator<E>(array, start); }
/** * 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 <E> the element type * @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 or end is before start * @throws IndexOutOfBoundsException if array bounds are invalid * @throws NullPointerException if array is null */ public static <E> ResettableIterator<E> arrayIterator(final Object array, final int start, final int end) { return new ArrayIterator<E>(array, start, end); }