Package org.revapi.query
Class DFSFilteringIterator<E extends Element>
- java.lang.Object
-
- org.revapi.query.DFSFilteringIterator<E>
-
- All Implemented Interfaces:
Iterator<E>
@Deprecated public class DFSFilteringIterator<E extends Element> extends Object implements Iterator<E>
Deprecated.This always had very limited utility andElement.stream(Class, boolean)
seems to be a more usable alternative.Recursively walks an element forest in a depth-first manner leaving out elements not matching the optionally provided filter.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
hasNext()
Deprecated.E
next()
Deprecated.void
remove()
Deprecated.-
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
-
DFSFilteringIterator
public DFSFilteringIterator(@Nonnull Iterator<? extends Element> rootIterator, @Nonnull Class<? extends E> resultClass, @Nullable Filter<? super E> filter)
Deprecated.Constructor.- Parameters:
rootIterator
- the iterator over the root elements of the forestresultClass
- the class of the elements to look for in the forest. All the returned elements will be assignable to this class.filter
- optional filter that further filters out unwanted elements.
-
-