Class FilteredIterator<E>
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<T>
-
- com.google.common.collect.AbstractIterator<E>
-
- org.eclipse.emf.compare.ide.ui.internal.util.FilteredIterator<E>
-
- Type Parameters:
E
- the type of elements returned by this iterator
- All Implemented Interfaces:
Iterator<E>
public class FilteredIterator<E> extends com.google.common.collect.AbstractIterator<E>
A wrapper for aTreeIterator
that only returns nodes that satisfy a predicate and skips all others and their descendants.
-
-
Constructor Summary
Constructors Constructor Description FilteredIterator(TreeIterator<E> delegate, com.google.common.base.Predicate<? super E> predicate)
Constructs a new iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected E
computeNext()
-
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
FilteredIterator
public FilteredIterator(TreeIterator<E> delegate, com.google.common.base.Predicate<? super E> predicate)
Constructs a new iterator.- Parameters:
delegate
- a tree iteratorpredicate
- the predicate to satisfy; all nodes (including their descendants) for which the predicate yieldsfalse
are skipped
-
-