Class IteratorHelpers
java.lang.Object
com.ibm.j9ddr.util.IteratorHelpers
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for filtering iterators -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Iterator
<T> combineIterators
(Iterator<T>... iterators) Takes a list of iterators and returns one iterator that iterates over each iterator in turn.static <T> Iterator
<T> filterIterator
(Iterator<T> it, IteratorHelpers.IteratorFilter<T> filter) Filters an iteratorstatic <T> List
<T>
-
Constructor Details
-
IteratorHelpers
public IteratorHelpers()
-
-
Method Details
-
combineIterators
-
toList
-
filterIterator
public static <T> Iterator<T> filterIterator(Iterator<T> it, IteratorHelpers.IteratorFilter<T> filter) Filters an iterator- Type Parameters:
T
- Generic type of iterator- Parameters:
it
- Iterator to be filteredfilter
- Filter object to select which objects to be passed through- Returns:
- Filtered iterator
-