vanetsim.scenario
Class LaneObject

java.lang.Object
  extended by vanetsim.scenario.LaneObject
Direct Known Subclasses:
BlockingObject, Vehicle

public class LaneObject
extends java.lang.Object

This class represents an object which is on a lane of a street. Use this class as a base for all object which are on a lane (for example with a vehicle).


Constructor Summary
LaneObject()
           
 
Method Summary
 boolean getCurDirection()
          Gets the current direction on the street.
 int getCurLane()
          Gets the current lane.
 double getCurPosition()
          Gets the current relative position of this object.
 int getCurSpeed()
          Gets the current speed of this object.
 Street getCurStreet()
          Gets the current street.
 LaneObject getNext()
          Returns the LaneObject after this one.
 LaneObject getPrevious()
          Returns the LaneObject before this one.
 int getX()
          Gets the current x coordinate.
 int getY()
          Gets the current y coordinate.
 void setNext(LaneObject next)
          Sets the LaneObject after this one.
 void setPrevious(LaneObject previous)
          Sets the LaneObject before this one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaneObject

public LaneObject()
Method Detail

getX

public int getX()
Gets the current x coordinate.

Returns:
the current x coordinate

getY

public int getY()
Gets the current y coordinate.

Returns:
the current y coordinate

getCurSpeed

public int getCurSpeed()
Gets the current speed of this object.

Returns:
the current speed in cm/s

getCurPosition

public double getCurPosition()
Gets the current relative position of this object.

Returns:
the current position measured in cm from startNode

getCurLane

public int getCurLane()
Gets the current lane.

Returns:
the lane measured from the right side of the street

getCurStreet

public Street getCurStreet()
Gets the current street.

Returns:
the street

getCurDirection

public boolean getCurDirection()
Gets the current direction on the street.

Returns:
true = moving from startNode to endNode
false = moving from endNode to startNode

getNext

public LaneObject getNext()
Returns the LaneObject after this one.

Returns:
the next

getPrevious

public LaneObject getPrevious()
Returns the LaneObject before this one.

Returns:
the previous

setNext

public void setNext(LaneObject next)
Sets the LaneObject after this one.

Parameters:
next - the object which comes after this one

setPrevious

public void setPrevious(LaneObject previous)
Sets the LaneObject before this one.

Parameters:
previous - the object which comes before this one