Class NodeId

java.lang.Object
com.kosdev.kos.commons.util.NodeId

public class NodeId extends Object
A nodeId is the combination of a node type and node name. This class allows a nodeId to be created from the constituent parts or from a string representation of a nodeId.
Since:
1
Version:
1
  • Constructor Details

    • NodeId

      public NodeId(String str)
      Create a new NodeId from a string representation.
      Parameters:
      str -
      Since:
      1
    • NodeId

      public NodeId(String nodeType, String nodeName)
      Create a new NodeId from a nodeType and nodeName.
      Parameters:
      nodeType - the node type
      nodeName - the node name
      Since:
      1
  • Method Details

    • getId

      public String getId()
      Return the id which is the composition of the nodeType and nodeName. This is equivalent to toString() .
      Since:
      1
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNodeType

      public String getNodeType()
    • getNodeName

      public String getNodeName()
    • setNodeType

      public void setNodeType(String nodeType)
    • setNodeName

      public void setNodeName(String nodeName)
    • setId

      public void setId(String id)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object