Constructor and Description |
---|
DFSFilteringIterator(Iterator<? extends Element> rootIterator,
Class<? extends E> resultClass,
Filter<? super E> filter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
E |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public DFSFilteringIterator(@Nonnull Iterator<? extends Element> rootIterator, @Nonnull Class<? extends E> resultClass, @Nullable Filter<? super E> filter)
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.public void remove()
remove
in interface Iterator<E extends Element>
UnsupportedOperationException
- This is not supported.Copyright © 2014-2020 Lukas Krejci. All Rights Reserved.