java.lang.Object
ntnu.idatt2104.madlads.nodeServerAPI.model.Node

public class Node extends Object
  • Constructor Details

    • Node

      public Node(int port, String address)
      Constructor
      Parameters:
      port - Port
      address - Address
    • Node

      public Node(String payload)
      Constructor that automatically parses a payload
      Parameters:
      payload - address and port combined as String
  • Method Details

    • getPort

      public int getPort()
      Returns port number
      Returns:
      port number
    • getAddress

      public String getAddress()
      Return address(ip)
      Returns:
      Ip address
    • equals

      public boolean equals(Object o)
      Equals method
      Overrides:
      equals in class Object
      Parameters:
      o - Object to equals
      Returns:
      boolean
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      To string method of this object
      Overrides:
      toString in class Object
      Returns:
      ip Adress and port