Lines Matching defs:iterator
25 * invocations of the {@link #iterator()} method after the first, and whose
26 * iterator is always unmodifiable.
33 * <li>returning the same iterator again
36 * implementations have, of returning a new, independent iterator
40 * invoke the {@code iterator} method only once, and should be tested using this
53 * Returns an iterable whose iterator returns the given elements in order.
56 // Make sure to get an unmodifiable iterator
57 return new MinimalIterable<E>(Arrays.asList(elements).iterator());
61 * Returns an iterable whose iterator returns the given elements in order.
70 private Iterator<E> iterator;
72 private MinimalIterable(Iterator<E> iterator) {
73 this.iterator = iterator;
77 public Iterator<E> iterator() {
78 if (iterator == null) {
84 return iterator;
86 iterator = null;