org.openstreetmap.josm.actions
Class JoinAreasAction.WayTraverser

java.lang.Object
  extended by org.openstreetmap.josm.actions.JoinAreasAction.WayTraverser
Enclosing class:
JoinAreasAction

private static class JoinAreasAction.WayTraverser
extends java.lang.Object

This hepler class implements algorithm traversing trough connected ways. Assumes you are going in clockwise orientation.


Field Summary
private  java.util.Set<JoinAreasAction.WayInPolygon> availableWays
           
private  JoinAreasAction.WayInPolygon lastWay
           
private  boolean lastWayReverse
           
 
Constructor Summary
JoinAreasAction.WayTraverser(java.util.Collection<JoinAreasAction.WayInPolygon> ways)
           
 
Method Summary
 JoinAreasAction.WayInPolygon advanceNextLeftmostWay()
           
 JoinAreasAction.WayInPolygon advanceNextRightmostWay()
           
private  JoinAreasAction.WayInPolygon advanceNextWay(boolean rightmost)
           
 Node getLastWayEndNode()
           
 Node getLastWayStartNode()
           
 boolean hasWays()
           
 boolean isLastWayInsideToTheRight()
           
 void removeWays(java.util.Collection<JoinAreasAction.WayInPolygon> ways)
           
 JoinAreasAction.WayInPolygon startNewWay()
           
 JoinAreasAction.WayInPolygon startNewWay(JoinAreasAction.WayInPolygon way)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

availableWays

private java.util.Set<JoinAreasAction.WayInPolygon> availableWays

lastWay

private JoinAreasAction.WayInPolygon lastWay

lastWayReverse

private boolean lastWayReverse
Constructor Detail

JoinAreasAction.WayTraverser

public JoinAreasAction.WayTraverser(java.util.Collection<JoinAreasAction.WayInPolygon> ways)
Method Detail

removeWays

public void removeWays(java.util.Collection<JoinAreasAction.WayInPolygon> ways)

hasWays

public boolean hasWays()

startNewWay

public JoinAreasAction.WayInPolygon startNewWay(JoinAreasAction.WayInPolygon way)

startNewWay

public JoinAreasAction.WayInPolygon startNewWay()

advanceNextLeftmostWay

public JoinAreasAction.WayInPolygon advanceNextLeftmostWay()

advanceNextRightmostWay

public JoinAreasAction.WayInPolygon advanceNextRightmostWay()

advanceNextWay

private JoinAreasAction.WayInPolygon advanceNextWay(boolean rightmost)

isLastWayInsideToTheRight

public boolean isLastWayInsideToTheRight()

getLastWayStartNode

public Node getLastWayStartNode()

getLastWayEndNode

public Node getLastWayEndNode()


JOSM