vanetsim.routing
Class WayPoint

java.lang.Object
  extended by vanetsim.routing.WayPoint

public final class WayPoint
extends java.lang.Object

A waypoint used for routing.


Constructor Summary
WayPoint(int x, int y, int waitTime)
          Instantiates a new waypoint.
 
Method Summary
 double getPositionOnStreet()
          Gets the position on the street.
 Street getStreet()
          Gets the street on which this waypoint is located.
 int getWaittime()
          Gets the time to wait BEFORE movement to the next waypoint begins.
 int getX()
          Gets the x coordinate.
 int getY()
          Gets the y coordinate.
 void setWaittime(int waitTime)
          Sets the wait time
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WayPoint

public WayPoint(int x,
                int y,
                int waitTime)
         throws java.text.ParseException
Instantiates a new waypoint.

Parameters:
x - the x coordinate
y - the y coordinate
waitTime - the time to wait BEFORE movement to the next waypoint starts.
Throws:
java.text.ParseException - if the coordinates supplied couldn't be matched to a street within 100m distance.
Method Detail

getPositionOnStreet

public double getPositionOnStreet()
Gets the position on the street.

Returns:
the position in cm measured from the startNode

getStreet

public Street getStreet()
Gets the street on which this waypoint is located.

Returns:
the street

getWaittime

public int getWaittime()
Gets the time to wait BEFORE movement to the next waypoint begins.

Returns:
the time to wait BEFORE movement to the next waypoint starts

getX

public int getX()
Gets the x coordinate.

Returns:
the x coordinate

getY

public int getY()
Gets the y coordinate.

Returns:
the y coordinate

setWaittime

public void setWaittime(int waitTime)
Sets the wait time

Parameters:
waitTime -