Package game
Class NodeStatus
java.lang.Object
game.NodeStatus
- All Implemented Interfaces:
Comparable<NodeStatus>
Status of a graph node
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(NodeStatus other) If the distances of this and other are equal, return neg, 0 or pos depending on whether this id is less than, equal to, or greater than other's id.booleanReturn true iff ob is a NodeStatus with the same id as this one.intReturn the distance to the ring from the Node that corresponds br>to this NodeStatus.longgetId()Return the Id of the Node that corresponds to this NodeStatus.inthashCode()
-
Method Details
-
getId
public long getId()Return the Id of the Node that corresponds to this NodeStatus. -
getDistanceToRing
public int getDistanceToRing()Return the distance to the ring from the Node that corresponds br>to this NodeStatus. -
compareTo
If the distances of this and other are equal, return neg, 0 or pos depending on whether this id is less than, equal to, or greater than other's id. Otherwise, return neg, or pos number depending on whether this's distance is less than or greater than other's distance.- Specified by:
compareToin interfaceComparable<NodeStatus>
-
equals
Return true iff ob is a NodeStatus with the same id as this one. We don't have to be concerned with ob being a subclass of NodeStatus because this class is declared final. -
hashCode
public int hashCode()
-