Package game

Class Node

java.lang.Object
game.Node

public class Node extends Object
An instance is a node of the graph
  • Method Details

    • getId

      public long getId()
      Return the unique Identifier of this Node.
    • getEdge

      public Edge getEdge(Node q)
      Return the Edge of this Node that connects to Node q. Throw an IllegalArgumentException if edge doesn't exist
    • getExits

      public Set<Edge> getExits()
      Return an unmodifiable view of the Edges leaving this Node.
    • getNeighbors

      public Set<Node> getNeighbors()
      Return an unmodifiable view of the Nodes neighboring this Node.
    • getTile

      public Tile getTile()
      Return the Tile corresponding to this Node.
    • equals

      public boolean equals(Object ob)
      Return true iff ob is a Node with the same id as this one.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object