|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vanetsim.scenario.KnownVehicle
public class KnownVehicle
A known vehicle (discovered by receiving a beacon). The variables represent what is known and might differ from the real ones if it hasn't been updated for some time!
Constructor Summary | |
---|---|
KnownVehicle(Vehicle vehicle,
long ID,
int x,
int y,
int time,
double speed,
boolean isEncrypted)
Instantiates a new known vehicle. |
Method Summary | |
---|---|
long |
getID()
Gets the ID. |
int |
getLastUpdate()
Gets when this vehicle was last updated. |
KnownVehicle |
getNext()
Returns the KnownVehicle after this one. |
KnownVehicle |
getPrevious()
Returns the KnownVehicle before this one. |
double |
getSpeed()
Gets the speed |
Vehicle |
getVehicle()
Gets the vehicle. |
int |
getX()
Gets the x coordinate. |
int |
getY()
Gets the y coordinate. |
boolean |
isEncrypted_()
|
void |
setEncrypted_(boolean isEncrypted_)
|
void |
setLastUpdate(int time)
Updates the last modification time. |
void |
setNext(KnownVehicle next)
Sets the KnownVehicle after this one. |
void |
setPrevious(KnownVehicle previous)
Sets the KnownVehicle before this one. |
void |
setSpeed(double speed)
Updates the speed. |
void |
setX(int x)
Updates the x coordinate. |
void |
setY(int y)
Updates the y coordinate. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KnownVehicle(Vehicle vehicle, long ID, int x, int y, int time, double speed, boolean isEncrypted)
vehicle
- the vehicleID
- the ID of the vehiclex
- the x coordinatey
- the y coordinatetime
- the current timespeed
- the current speedisEncrypted
- if Beacon was encryptedMethod Detail |
---|
public void setX(int x)
x
- the x coordinatepublic void setY(int y)
y
- the y coordinatepublic void setLastUpdate(int time)
time
- the current timepublic void setSpeed(double speed)
speed
- the current speedpublic int getX()
public int getY()
public long getID()
public double getSpeed()
public Vehicle getVehicle()
public int getLastUpdate()
public KnownVehicle getNext()
public KnownVehicle getPrevious()
public void setNext(KnownVehicle next)
next
- the object which comes after this onepublic void setPrevious(KnownVehicle previous)
previous
- the object which comes before this onepublic boolean isEncrypted_()
public void setEncrypted_(boolean isEncrypted_)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |