private class Selector.ChildOrParentSelector.MatchingReferrerFinder extends java.lang.Object implements PrimitiveVisitor
Finds the first referrer matching Selector.ChildOrParentSelector.left
The visitor works on an environment and it saves the matching
referrer in e.parent and its relative position in the
list referrers "child list" in e.index.
If after execution e.parent is null, no matching
referrer was found.
| Modifier and Type | Field and Description |
|---|---|
private Environment |
e |
| Constructor and Description |
|---|
MatchingReferrerFinder(Environment e)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
private <T extends IPrimitive> |
doVisit(T parent,
java.util.function.IntSupplier counter,
java.util.function.IntFunction<IPrimitive> getter) |
void |
visit(INode n)
Visiting call for nodes.
|
void |
visit(IRelation<?> r)
Visiting call for relations.
|
void |
visit(IWay<?> w)
Visiting call for ways.
|
private final Environment e
MatchingReferrerFinder(Environment e)
e - the environment against which we matchpublic void visit(INode n)
PrimitiveVisitorvisit in interface PrimitiveVisitorn - The node to inspect.private <T extends IPrimitive> void doVisit(T parent, java.util.function.IntSupplier counter, java.util.function.IntFunction<IPrimitive> getter)
public void visit(IWay<?> w)
PrimitiveVisitorvisit in interface PrimitiveVisitorw - The way to inspect.public void visit(IRelation<?> r)
PrimitiveVisitorvisit in interface PrimitiveVisitorr - The relation to inspect.