Class RoutingEntry

java.lang.Object
RoutingEntry

public class RoutingEntry extends Object
  • Constructor Details

    • RoutingEntry

      public RoutingEntry(Node nextNode, int distance)
      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

      public void setRoutingEntry(Node nextNode, int distance)
      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

      public Node 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

      public String toString()
      Returns a string of the next node and the distance.
      Overrides:
      toString in class Object
      Returns:
      a string of the routing entry.