Class Selector.ChildOrParentSelector.MatchingReferrerFinder
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.mapcss.Selector.ChildOrParentSelector.MatchingReferrerFinder
-
- All Implemented Interfaces:
PrimitiveVisitor
- Enclosing class:
- Selector.ChildOrParentSelector
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" ine.index
.If after execution
e.parent
is null, no matching referrer was found.
-
-
Field Summary
Fields Modifier and Type Field Description private Environment
e
-
Constructor Summary
Constructors Constructor Description MatchingReferrerFinder(Environment e)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doVisit(IPrimitive parent)
private boolean
firstAndLastOnly()
void
visit(INode n)
Visiting call for nodes.void
visit(IRelation<?> r)
Visiting call for relations.void
visit(IWay<?> w)
Visiting call for ways.
-
-
-
Field Detail
-
e
private final Environment e
-
-
Constructor Detail
-
MatchingReferrerFinder
MatchingReferrerFinder(Environment e)
Constructor- Parameters:
e
- the environment against which we match
-
-
Method Detail
-
visit
public void visit(INode n)
Description copied from interface:PrimitiveVisitor
Visiting call for nodes.- Specified by:
visit
in interfacePrimitiveVisitor
- Parameters:
n
- The node to inspect.
-
doVisit
private void doVisit(IPrimitive parent)
-
firstAndLastOnly
private boolean firstAndLastOnly()
-
visit
public void visit(IWay<?> w)
Description copied from interface:PrimitiveVisitor
Visiting call for ways.- Specified by:
visit
in interfacePrimitiveVisitor
- Parameters:
w
- The way to inspect.
-
visit
public void visit(IRelation<?> r)
Description copied from interface:PrimitiveVisitor
Visiting call for relations.- Specified by:
visit
in interfacePrimitiveVisitor
- Parameters:
r
- The relation to inspect.
-
-