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.leftThe visitor works on an environment and it saves the matching referrer in
e.parentand its relative position in the list referrers "child list" ine.index.If after execution
e.parentis null, no matching referrer was found.
-
-
Field Summary
Fields Modifier and Type Field Description private Environmente
-
Constructor Summary
Constructors Constructor Description MatchingReferrerFinder(Environment e)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddoVisit(IPrimitive parent)private booleanfirstAndLastOnly()voidvisit(INode n)Visiting call for nodes.voidvisit(IRelation<?> r)Visiting call for relations.voidvisit(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:PrimitiveVisitorVisiting call for nodes.- Specified by:
visitin 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:PrimitiveVisitorVisiting call for ways.- Specified by:
visitin interfacePrimitiveVisitor- Parameters:
w- The way to inspect.
-
visit
public void visit(IRelation<?> r)
Description copied from interface:PrimitiveVisitorVisiting call for relations.- Specified by:
visitin interfacePrimitiveVisitor- Parameters:
r- The relation to inspect.
-
-