Iterator
instances. The implementations are provided in the iterators subpackage.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | DEFAULT_TOSTRING_DELIMITER
Default delimiter used to delimit elements while converting an Iterator to its String representation. |
| private static final String | DEFAULT_TOSTRING_PREFIX
Default prefix used while converting an Iterator to its String representation. |
| private static final String | DEFAULT_TOSTRING_SUFFIX
Default suffix used while converting an Iterator to its String representation. |
| public static final ResettableIterator | EMPTY_ITERATOR
An iterator over no elements. |
| public static final ResettableListIterator | EMPTY_LIST_ITERATOR
A list iterator over no elements. |
| public static final MapIterator | EMPTY_MAP_ITERATOR
A map iterator over no elements. |
| public static final OrderedIterator | EMPTY_ORDERED_ITERATOR
An ordered iterator over no elements. |
| public static final OrderedMapIterator | EMPTY_ORDERED_MAP_ITERATOR
An ordered map iterator over no elements. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < the element type E> ResettableIterator | Returns: an iterator over the arraythe array over which to iterate array)Gets an iterator over an object array. |
| public static < the element type E> ResettableIterator | Returns: an iterator over the arraythe array over which to iterate array)Gets an iterator over an object or primitive array. |
| public static < the element type E> ResettableIterator | Returns: an iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start)Gets an iterator over the end part of an object array. |
| public static < the element type E> ResettableIterator | Returns: an iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start)Gets an iterator over the end part of an object or primitive array. |
| public static < the element type E> ResettableIterator | Returns: an iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start, final int the index to finish iterating at end)Gets an iterator over part of an object array. |
| public static < the element type E> ResettableIterator | Returns: an iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start, final int the index to finish iterating at end)Gets an iterator over part of an object or primitive array. |
| public static < the element type E> ResettableListIterator | Returns: a list iterator over the arraythe array over which to iterate array)Gets a list iterator over an object array. |
| public static < the element type E> ResettableListIterator | Returns: a list iterator over the arraythe array over which to iterate array)Gets a list iterator over an object or primitive array. |
| public static < the element type E> ResettableListIterator | Returns: a list iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start)Gets a list iterator over the end part of an object array. |
| public static < the element type E> ResettableListIterator | Returns: a list iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start)Gets a list iterator over the end part of an object or primitive array. |
| public static < the element type E> ResettableListIterator | Returns: a list iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start, final int the index to finish iterating at end)Gets a list iterator over part of an object array. |
| public static < the element type E> ResettableListIterator | Returns: a list iterator over part of the arraythe array over which to iterate array, final int the index to start iterating at start, final int the index to finish iterating at end)Gets a list iterator over part of an object or primitive array. |
| public static < the element type E> Enumeration | Returns: a new enumerationthe iterator to use, may not be null iterator)Gets an enumeration that wraps an iterator. |
| public static < the element type E> Iterable | Returns: a new, single useIterablethe iterator to use, may not be null iterator)Gets an |
| public static < the element type E> Iterator | Returns: a new iteratorthe enumeration to use, may not be null enumeration)Gets an iterator that provides an iterator view of the given enumeration. |
| public static < the element type E> Iterator | Returns: a new iteratorthe enumeration to use, may not be null enumeration, final Collection<? super E> the collection to remove elements from, may not be null removeCollection)Gets an iterator that provides an iterator view of the given enumeration that will remove elements from the specified collection. |
| public static < the element type E> Iterable | Returns: a new, multiple use iterablethe iterator to use, may not be null iterator)Gets an iterable that wraps an iterator. |
| public static < the element type E> BoundedIterator | Returns: a new bounded iteratorthe iterator to decorate iterator, final long the maximum number of elements returned by this iterator max)Decorates the specified iterator to return at most the given number of elements. |
| public static < the element type E> BoundedIterator | Returns: a new bounded iteratorthe iterator to decorate iterator, final long the index of the first element of the decorated iterator to return offset, final long the maximum number of elements returned by this iterator max)Decorates the specified iterator to return at most the given number
of elements, skipping all elements until the iterator reaches the
position at |
| public static < the element type E> Iterator | Returns: a combination iterator over the iteratorsthe first iterator to use, not null iterator1, final Iterator<? extends E> the second iterator to use, not null iterator2)Gets an iterator that iterates through two |
| public static < the element type E> Iterator | Returns: a combination iterator over the iteratorsthe iterators to use, not null or empty or contain nulls iterators)Gets an iterator that iterates through an array of |
| public static < the element type E> Iterator | Returns: a combination iterator over the iteratorsthe iterators to use, not null or empty or contain nulls iterators)Gets an iterator that iterates through a collections of |
| public static < the element type E> Iterator | Returns: a combination iterator over the iteratorsthe comparator to use, may be null for natural order comparator, final Iterator<? extends E> the first iterators to use, not null iterator1, final Iterator<? extends E> the first iterators to use, not null iterator2)Gets an iterator that provides an ordered iteration over the elements
contained in a collection of ordered |
| public static < the element type E> Iterator | Returns: a combination iterator over the iteratorsthe comparator to use, may be null for natural order comparator, final Iterator<? extends E>... the iterators to use, not null or empty or contain nulls iterators)Gets an iterator that provides an ordered iteration over the elements
contained in an array of |
| public static < the element type E> Iterator | Returns: a combination iterator over the iteratorsthe comparator to use, may be null for natural order comparator, final Collection<Iterator<? extends E>> the iterators to use, not null or empty or contain nulls iterators)Gets an iterator that provides an ordered iteration over the elements
contained in a collection of |
| public static < the type of object the E> booleanIterator contains | |
| public static < the element type E> ResettableIterator | |
| public static < the element type E> ResettableListIterator | |
| public static < the key type K, the value type V> MapIterator | |
| public static < the element type E> OrderedIterator | |
| public static < the key type K, the value type V> OrderedMapIterator | |
| public static < the element type E> Iterator | Returns: a new filtered iteratorthe iterator to use, not null iterator, final Predicate<? super E> the predicate to use as a filter, not null predicate)Gets an iterator that filters another iterator. |
| public static < the element type E> ListIterator | Returns: a new filtered iteratorthe list iterator to use, not null listIterator, final Predicate<? super E> the predicate to use as a filter, not null predicate)Gets a list iterator that filters another list iterator. |
| public static < the element type E> E | Returns: the first element of the iterator which matches the predicate or null if none could be foundthe iterator to search, may be null iterator, final Predicate<? super E> the predicate to use, may not be null predicate)Finds the first element in the given iterator which matches the given predicate. |
| public static < the type of object in the E> EIterator | |
| public static < the element type E> void | |
| public static < the type of object the E> EIterator contains | Returns: the last element in the iterator, or null if iterator is null or emptythe iterator to get the input from, may be null iterator, final Closure<? super E> the closure to perform, may not be null closure)Executes the given closure on each but the last element in the iterator. |
| public static < the type of object in the E> EIterator | |
| public static Iterator | Returns: a suitable iterator, never nullthe object to convert to an iterator obj)Gets a suitable Iterator for the given object. |
| public static < the element type E> int | Returns: the index of the first element which matches the predicate or -1 if none matchesthe iterator to search, may be null iterator, final Predicate<? super E> the predicate to use, may not be null predicate)Returns the index of the first element in the specified iterator that matches the given predicate. |
| public static boolean | |
| public static < the element type E> ResettableIterator | Returns: a new looping iteratorthe collection to iterate over, not null coll)Gets an iterator that loops continuously over the supplied collection. |
| public static < the element type E> ResettableListIterator | Returns: a new looping iteratorthe list to iterate over, not null list)Gets an iterator that loops continuously over the supplied list. |
| public static < the type of object the E> booleanIterator contains | Returns: true if every element of the collection matches the predicate or if the collection is empty, false otherwisethe iterator, final Predicate<? super E> Iterator to use, may be nullthe predicate to use, may not be null predicate)Answers true if a predicate is true for every element of an iterator. |
| public static < the type of object the E> booleanIterator contains | Returns: true if any element of the collection matches the predicate, false otherwisethe iterator, final Predicate<? super E> Iterator to use, may be nullthe predicate to use, may not be null predicate)Answers true if a predicate is true for any element of the iterator. |
| public static NodeListIterator | Returns: a new, single useIteratorthe node list to use, may not be null nodeList) |
| public static NodeListIterator | Returns: a new, single useIteratorthe node to use, may not be null node)Gets an |
| public static < the element type E> Iterator | Returns: a new object graph iteratorthe root object to start iterating from, null results in an empty iterator root, final Transformer<? super E, ? extends E> the transformer to use, see above, null uses no effect transformer transformer)Gets an iterator that operates over an object graph. |
| public static < the element type E> Iterator | Returns: a peeking iteratorthe iterator to decorate, not null iterator)Gets an iterator that supports one-element lookahead. |
| public static < the element type E> Iterator | Returns: a pushback iteratorthe iterator to decorate, not null iterator)Gets an iterator that supports pushback of elements. |
| public static < the element type E> ResettableIterator | Returns: a singleton iterator over the objectthe single object over which to iterate object)Gets a singleton iterator. |
| public static < the element type E> ListIterator | Returns: a singleton list iterator over the objectthe single object over which to iterate object)Gets a singleton list iterator. |
| public static int | |
| public static < the element type E> SkippingIterator | Returns: a new skipping iteratorthe iterator to decorate iterator, final long the first number of elements to skip offset)Decorates the specified iterator to skip the first N elements. |
| public static Object[] | |
| public static < the element type E> E[] | |
| public static < the element type E> List | |
| public static < the element type E> List | |
| public static < the element type E> ListIterator | Returns: a new iteratorthe iterator to use, may not be null iterator)Gets a list iterator based on a simple iterator. |
| public static < the element type E> String | |
| public static < the element type E> String | Returns: a string representation ofiteratorthe iterator to convert to a string, may be null iterator, final Transformer<? super E, String> the transformer used to get a string representation of an element transformer)Returns a string representation of the elements of the specified iterator. |
| public static < the element type E> String | Returns: a string representation ofiteratorthe iterator to convert to a string, may be null iterator, final Transformer<? super E, String> the transformer used to get a string representation of an element transformer, final String the string to delimit elements delimiter, final String the prefix, prepended to the string representation prefix, final String the suffix, appended to the string representation suffix)Returns a string representation of the elements of the specified iterator. |
| public static < the input type I, the output type O> Iterator | Returns: a new transforming iteratorthe iterator to use, not null iterator, final Transformer<? super I, ? extends O> the transform to use, not null transform)Gets an iterator that transforms the elements of another iterator. |
| public static < the element type E> Iterator | Returns: an immutable version of the iteratorthe iterator to make immutable iterator)Gets an immutable version of an |
| public static < the element type E> ListIterator | Returns: an immutable version of the iteratorthe iterator to make immutable listIterator)Gets an immutable version of a |
| public static < the key type K, the value type V> MapIterator | Returns: an immutable version of the iteratorthe iterator to make immutable mapIterator)Gets an immutable version of a |
| public static < the element type E> ZippingIterator | Returns: an iterator, interleaving the decorated iteratorsthe first iterator to interleave a, final Iterator<? extends E> the second iterator to interleave b)Returns an iterator that interleaves elements from the decorated iterators. |
| public static < the element type E> ZippingIterator | Returns: an iterator, interleaving the decorated iteratorsthe first iterator to interleave a, final Iterator<? extends E> the second iterator to interleave b, final Iterator<? extends E> the third iterator to interleave c)Returns an iterator that interleaves elements from the decorated iterators. |
| public static < the element type E> ZippingIterator | Returns: an iterator, interleaving the decorated iteratorsthe array of iterators to interleave iterators)Returns an iterator that interleaves elements from the decorated iterators. |