private class Selector.ChildOrParentSelector.MatchingReferrerFinder extends java.lang.Object implements OsmPrimitiveVisitor
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 OsmPrimitive> |
doVisit(T parent,
java.util.function.IntSupplier counter,
java.util.function.IntFunction<OsmPrimitive> getter) |
void |
visit(Node n)
Visiting call for points.
|
void |
visit(Relation r)
Visiting call for relations.
|
void |
visit(Way w)
Visiting call for lines.
|
private final Environment e
MatchingReferrerFinder(Environment e)
e
- the environment against which we matchpublic void visit(Node n)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
n
- The node to inspect.private <T extends OsmPrimitive> void doVisit(T parent, java.util.function.IntSupplier counter, java.util.function.IntFunction<OsmPrimitive> getter)
public void visit(Way w)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
w
- The way to inspect.public void visit(Relation r)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
r
- The relation to inspect.