org.openstreetmap.josm.gui.mappaint.mapcss
Class Selector.ChildOrParentSelector.MatchingReferrerFinder

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
      extended by org.openstreetmap.josm.gui.mappaint.mapcss.Selector.ChildOrParentSelector.MatchingReferrerFinder
All Implemented Interfaces:
Visitor
Enclosing class:
Selector.ChildOrParentSelector

private class Selector.ChildOrParentSelector.MatchingReferrerFinder
extends AbstractVisitor

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.


Field Summary
private  Environment e
           
 
Constructor Summary
Selector.ChildOrParentSelector.MatchingReferrerFinder(Environment e)
          Constructor
 
Method Summary
 void visit(Node n)
          Visiting call for points.
 void visit(Relation r)
          Visiting call for relations.
 void visit(Way w)
          Visiting call for lines.
 
Methods inherited from class org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e

private Environment e
Constructor Detail

Selector.ChildOrParentSelector.MatchingReferrerFinder

public Selector.ChildOrParentSelector.MatchingReferrerFinder(Environment e)
Constructor

Parameters:
e - the environment against which we match
Method Detail

visit

public void visit(Node n)
Description copied from interface: Visitor
Visiting call for points.

Parameters:
n - The node to inspect.

visit

public void visit(Way w)
Description copied from interface: Visitor
Visiting call for lines.

Parameters:
w - The way to inspect.

visit

public void visit(Relation r)
Description copied from interface: Visitor
Visiting call for relations.

Parameters:
r - The relation to inspect.


JOSM