VANET Simulator
 All Classes Functions Variables
Public Member Functions | Static Public Member Functions | List of all members
vanetsim.map.Node Class Reference

Public Member Functions

 Node (int x, int y)
 
 Node (int x, int y, boolean hasTrafficSignal)
 
void calculateJunction ()
 
Junction getJunction ()
 
void addOutgoingStreet (Street street)
 
boolean delOutgoingStreet (Street street)
 
Street[] getOutgoingStreets ()
 
int getOutgoingStreetsCount ()
 
void addCrossingStreet (Street street)
 
boolean delCrossingStreet (Street street)
 
Street[] getCrossingStreets ()
 
int getCrossingStreetsCount ()
 
int getX ()
 
void setX (int x)
 
int getY ()
 
void setY (int y)
 
void setRegion (Region region)
 
Region getRegion ()
 
boolean equals (Object other)
 
int getNodeID ()
 
int hashCode ()
 
void setMixZoneRadius (int mixZoneRadius)
 
int getMixZoneRadius ()
 
RSU getEncryptedRSU_ ()
 
void setEncryptedRSU_ (RSU encryptedRSU_)
 
boolean isHasTrafficSignal_ ()
 
void setHasTrafficSignal_ (boolean hasTrafficSignal_)
 
void setTrafficLight_ (TrafficLight trafficLight_)
 
TrafficLight getTrafficLight_ ()
 
int[] getStreetHasException_ ()
 
void setStreetHasException_ (int[] streetHasException_)
 
void addSignalExceptionsOfString (String arrayString)
 
boolean hasNonDefaultSettings ()
 
String getSignalExceptionsInString ()
 

Static Public Member Functions

static int getMaxNodeID ()
 
static void resetNodeID ()
 

Detailed Description

A node on the map.

Constructor & Destructor Documentation

vanetsim.map.Node.Node ( int  x,
int  y 
)
inline

Instantiates a new node.

Parameters
xthe x coordinate
ythe y coordinate
vanetsim.map.Node.Node ( int  x,
int  y,
boolean  hasTrafficSignal 
)
inline

Instantiates a new node.

Parameters
xthe x coordinate
ythe y coordinate
hasTrafficSignalsignals if node has a traffic signal

Member Function Documentation

void vanetsim.map.Node.addCrossingStreet ( Street  street)
inline

Adds a crossing street. If the array already contains the street, nothing is done. Note that this operation is not thread-safe.

Parameters
streetthe crossing street to add.
void vanetsim.map.Node.addOutgoingStreet ( Street  street)
inline

Adds an outgoing street. If the array already contains the street, nothing is done. Note that this operation is not thread-safe.

Parameters
streetThe outgoing street to add.
void vanetsim.map.Node.addSignalExceptionsOfString ( String  arrayString)
inline

Fill Exception Array of a String.

void vanetsim.map.Node.calculateJunction ( )
inline

Calculates if this is a junction and the priorities of all possible ways which go over this junction.

boolean vanetsim.map.Node.delCrossingStreet ( Street  street)
inline

Removes a crossing street. If the array doesn't contain the street, nothing is done. Note that this operation is not thread-safe.

Parameters
streetthe incoming street to delete.
Returns
true if street was removed, false if the street wasn't in the list
boolean vanetsim.map.Node.delOutgoingStreet ( Street  street)
inline

Removes an outgoing street. If the array doesn't contain the street, nothing is done. Note that this operation is not thread-safe.

Parameters
streetThe outgoing street to delete.
Returns
true if street was removed, false if the street wasn't in the list
boolean vanetsim.map.Node.equals ( Object  other)
inline

Checks if this object is equal to another.

Parameters
otherthe object to compare to
Returns
true, if both are equal
See Also
java.lang.Object::equals(java.lang.Object)
Street [] vanetsim.map.Node.getCrossingStreets ( )
inline

Gets an array of the streets which are crossing in this node. You will always get an array (never null) but it might have zero size.

Returns
the array
int vanetsim.map.Node.getCrossingStreetsCount ( )
inline

Gets the number of streets crossing in this node.

Returns
the amount of streets
Junction vanetsim.map.Node.getJunction ( )
inline

Returns the junction object associated with this node or null if this is not a junction.

Returns
the junction or null if this is not a junction
static int vanetsim.map.Node.getMaxNodeID ( )
inlinestatic

The maximum ID a node has.

Returns
the maximum ID
int vanetsim.map.Node.getMixZoneRadius ( )
inline

The mixZoneRadius

Returns
the max zone radius
int vanetsim.map.Node.getNodeID ( )
inline

Returns the unique ID of this node.

Returns
an integer
Street [] vanetsim.map.Node.getOutgoingStreets ( )
inline

Gets an array of the outgoing streets of this node. You will always get an array (never null) but it might have zero size.

Returns
the array
int vanetsim.map.Node.getOutgoingStreetsCount ( )
inline

Gets the number of streets going out from this node.

Returns
the amount of streets
Region vanetsim.map.Node.getRegion ( )
inline

Gets the region in which this node is found.

Returns
the region
String vanetsim.map.Node.getSignalExceptionsInString ( )
inline

Write exception array in one string. Please check if Signal has exceptions before using.

Returns
string with exceptions
int [] vanetsim.map.Node.getStreetHasException_ ( )
inline
Returns
the streetHasException_
TrafficLight vanetsim.map.Node.getTrafficLight_ ( )
inline
Returns
the trafficLight_
int vanetsim.map.Node.getX ( )
inline

Gets the x coordinate.

Returns
the x coordinate
int vanetsim.map.Node.getY ( )
inline

Gets the y coordinate.

Returns
the y coordinate
int vanetsim.map.Node.hashCode ( )
inline

Creates a hash code (needed for HashMaps or similar structures).

Returns
an Integer
See Also
java.lang.Object::hashCode()
boolean vanetsim.map.Node.hasNonDefaultSettings ( )
inline

Check if a Traffic Signal has non-default settings

Returns
true if settings are non-default
static void vanetsim.map.Node.resetNodeID ( )
inlinestatic

Resets the node ID counter so that newly created nodes begin with an ID of 0.

void vanetsim.map.Node.setMixZoneRadius ( int  mixZoneRadius)
inline

Sets the mix zone radius

Parameters
mixZoneRadiusthe new mix zone radius
void vanetsim.map.Node.setRegion ( Region  region)
inline

Sets the region in which this node is found.

Parameters
regionthe region
void vanetsim.map.Node.setStreetHasException_ ( int[]  streetHasException_)
inline
Parameters
streetHasException_the streetHasException_ to set
void vanetsim.map.Node.setTrafficLight_ ( TrafficLight  trafficLight_)
inline
Parameters
trafficLight_the trafficLight_ to set
void vanetsim.map.Node.setX ( int  x)
inline

Sets the x coordinate

Parameters
xthe new coordinate
void vanetsim.map.Node.setY ( int  y)
inline

Sets the y coordinate

Parameters
ythe new coordinate

The documentation for this class was generated from the following file: