Class RoutingEntry
java.lang.Object
RoutingEntry
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingEntry(Node nextNode, int distance) Constructs and initializes a routing entry. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the distance from the node that detected an event.Returns the next node to go to.voidsetRoutingEntry(Node nextNode, int distance) Sets the routing entry to another node and another distance.toString()Returns a string of the next node and the distance.
-
Constructor Details
-
RoutingEntry
Constructs and initializes a routing entry.- Parameters:
nextNode- the next node to go to.distance- the distance from the node that detected an event.
-
-
Method Details
-
setRoutingEntry
Sets the routing entry to another node and another distance.- Parameters:
nextNode- the next node to go to.distance- the distance from the node that detected an event.
-
getNextNode
Returns the next node to go to.- Returns:
- the next node to go to.
-
getDistance
public int getDistance()Returns the distance from the node that detected an event.- Returns:
- the distance.
-
toString
Returns a string of the next node and the distance.
-