Package org.opennms.netmgt.rtc.datablock
Class RTCNodeKey
- java.lang.Object
-
- org.opennms.netmgt.rtc.datablock.RTCNodeKey
-
- All Implemented Interfaces:
java.lang.Comparable<RTCNodeKey>
public class RTCNodeKey extends java.lang.Object implements java.lang.Comparable<RTCNodeKey>
The key used to look up items in the data map- Author:
- Sowmya Kumaraswamy , OpenNMS.org
-
-
Constructor Summary
Constructors Constructor Description RTCNodeKey(int nodeid, java.net.InetAddress ip, java.lang.String svcname)the constructor for this class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RTCNodeKey obj)Implements java.jang.Comparable since this is a key to a tree mapbooleanequals(java.lang.Object o)Overrides the 'equals()' method in the 'Object' superclassjava.net.InetAddressgetIP()Return the IP addressintgetNodeID()Return the node IDjava.lang.StringgetSvcName()Return the service nameinthashCode()Overrides the 'hashCode()' method in the 'Object' superclassjava.lang.StringtoString()Returns a string representation of this key
-
-
-
Method Detail
-
getNodeID
public int getNodeID()
Return the node ID- Returns:
- the node ID
-
getSvcName
public java.lang.String getSvcName()
Return the service name- Returns:
- the service name
-
getIP
public java.net.InetAddress getIP()
Return the IP address- Returns:
- the IP address
-
hashCode
public int hashCode()
Overrides the 'hashCode()' method in the 'Object' superclass- Overrides:
hashCodein classjava.lang.Object- Returns:
- a sum of hashCodes of the individual attributes
-
equals
public boolean equals(java.lang.Object o)
Overrides the 'equals()' method in the 'Object' superclass- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(RTCNodeKey obj)
Implements java.jang.Comparable since this is a key to a tree map- Specified by:
compareToin interfacejava.lang.Comparable<RTCNodeKey>- Parameters:
obj- aRTCNodeKeyobject.- Returns:
- a int.
-
toString
public java.lang.String toString()
Returns a string representation of this key- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this key
-
-