Class RefsVisitor<I,O>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<Object>
com.google.common.collect.AbstractIterator<Object>
org.qubership.atp.dataset.model.utils.tree.AllRefsIterator<Object>
org.qubership.atp.dataset.model.utils.tree.RefsVisitor<I,O>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRefsVisitor(Iterator<? extends I> parents, TraverseVisitor<I, O> visitor, Predicate<Object> itemsFilter)
Iterates over a tree hierarchy. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidforwardToNewParent(Object parent) getChildren(Object parent) Methods inherited from class org.qubership.atp.dataset.model.utils.tree.AllRefsIterator
computeNextMethods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
currentTraverseHandler
-
-
Constructor Details
-
RefsVisitor
public RefsVisitor(@Nonnull Iterator<? extends I> parents, @Nonnull TraverseVisitor<I, O> visitor, @Nullable Predicate<Object> itemsFilter)
Iterates over a tree hierarchy.
TheIterator.next()invocation returns item of current iteration, same asAllRefsIterator.
Reports about vertical level changes using childrenSup and backToParentsCb.
Does not resolve recursion by default. You can do that in childrenSup or itemsFilter.
Reports about leafs found using leafsConsumer.
One iteration may result in invocation of leafsConsumer no more then one time.- Parameters:
parents- to iterate over. Inclusive.visitor- to handle visit events.itemsFilter- filters objects to iterate over. Delegates toAllRefsIterator.itemsFilter
-
-
Method Details
-
getChildren
-
forwardToNewParent
-
backToPreviousParent
protected void backToPreviousParent()
-