|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvanetsim.map.Node
public final class Node
A node on the map.
| Constructor Summary | |
|---|---|
Node(int x,
int y)
Instantiates a new node. |
|
Node(int x,
int y,
boolean hasTrafficSignal)
Instantiates a new node. |
|
| Method Summary | |
|---|---|
void |
addCrossingStreet(Street street)
Adds a crossing street. |
void |
addOutgoingStreet(Street street)
Adds an outgoing street. |
void |
addSignalExceptionsOfString(java.lang.String arrayString)
Fill Exception Array of a String. |
void |
calculateJunction()
Calculates if this is a junction and the priorities of all possible ways which go over this junction. |
boolean |
delCrossingStreet(Street street)
Removes a crossing street. |
boolean |
delOutgoingStreet(Street street)
Removes an outgoing street. |
boolean |
equals(java.lang.Object other)
Checks if this object is equal to another. |
Street[] |
getCrossingStreets()
Gets an array of the streets which are crossing in this node. |
int |
getCrossingStreetsCount()
Gets the number of streets crossing in this node. |
RSU |
getEncryptedRSU_()
|
Junction |
getJunction()
Returns the junction object associated with this node or null if this is not a junction. |
static int |
getMaxNodeID()
The maximum ID a node has. |
int |
getMixZoneRadius()
The mixZoneRadius |
int |
getNodeID()
Returns the unique ID of this node. |
Street[] |
getOutgoingStreets()
Gets an array of the outgoing streets of this node. |
int |
getOutgoingStreetsCount()
Gets the number of streets going out from this node. |
Region |
getRegion()
Gets the region in which this node is found. |
java.lang.String |
getSignalExceptionsInString()
Write exception array in one string. |
int[] |
getStreetHasException_()
|
TrafficLight |
getTrafficLight_()
|
int |
getX()
Gets the x coordinate. |
int |
getY()
Gets the y coordinate. |
int |
hashCode()
Creates a hash code (needed for HashMaps or similar structures). |
boolean |
hasNonDefaultSettings()
Check if a Traffic Signal has non-default settings |
boolean |
isHasTrafficSignal_()
|
static void |
resetNodeID()
Resets the node ID counter so that newly created nodes begin with an ID of 0. |
void |
setEncryptedRSU_(RSU encryptedRSU_)
|
void |
setHasTrafficSignal_(boolean hasTrafficSignal_)
|
void |
setMixZoneRadius(int mixZoneRadius)
Sets the mix zone radius |
void |
setRegion(Region region)
Sets the region in which this node is found. |
void |
setStreetHasException_(int[] streetHasException_)
|
void |
setTrafficLight_(TrafficLight trafficLight_)
|
void |
setX(int x)
Sets the x coordinate |
void |
setY(int y)
Sets the y coordinate |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Node(int x,
int y)
x - the x coordinatey - the y coordinate
public Node(int x,
int y,
boolean hasTrafficSignal)
x - the x coordinatey - the y coordinatehasTrafficSignal - signals if node has a traffic signal| Method Detail |
|---|
public void calculateJunction()
public Junction getJunction()
null if this is not a junction.
null if this is not a junctionpublic void addOutgoingStreet(Street street)
street - The outgoing street to add.public boolean delOutgoingStreet(Street street)
street - The outgoing street to delete.
true if street was removed, false if the street wasn't in the listpublic Street[] getOutgoingStreets()
null)
but it might have zero size.
public int getOutgoingStreetsCount()
public void addCrossingStreet(Street street)
street - the crossing street to add.public boolean delCrossingStreet(Street street)
street - the incoming street to delete.
true if street was removed, false if the street wasn't in the listpublic Street[] getCrossingStreets()
null)
but it might have zero size.
public int getCrossingStreetsCount()
public int getX()
public void setX(int x)
x - the new coordinatepublic int getY()
public void setY(int y)
y - the new coordinatepublic void setRegion(Region region)
region - the regionpublic Region getRegion()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the object to compare to
true, if both are equalObject.equals(java.lang.Object)public int getNodeID()
public static int getMaxNodeID()
public static void resetNodeID()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public void setMixZoneRadius(int mixZoneRadius)
mixZoneRadius - the new mix zone radiuspublic int getMixZoneRadius()
public RSU getEncryptedRSU_()
public void setEncryptedRSU_(RSU encryptedRSU_)
public boolean isHasTrafficSignal_()
public void setHasTrafficSignal_(boolean hasTrafficSignal_)
public void setTrafficLight_(TrafficLight trafficLight_)
trafficLight_ - the trafficLight_ to setpublic TrafficLight getTrafficLight_()
public int[] getStreetHasException_()
public void setStreetHasException_(int[] streetHasException_)
streetHasException_ - the streetHasException_ to setpublic void addSignalExceptionsOfString(java.lang.String arrayString)
public boolean hasNonDefaultSettings()
public java.lang.String getSignalExceptionsInString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||