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 int
compareTo(RTCNodeKey obj)
Implements java.jang.Comparable since this is a key to a tree mapboolean
equals(java.lang.Object o)
Overrides the 'equals()' method in the 'Object' superclassjava.net.InetAddress
getIP()
Return the IP addressint
getNodeID()
Return the node IDjava.lang.String
getSvcName()
Return the service nameint
hashCode()
Overrides the 'hashCode()' method in the 'Object' superclassjava.lang.String
toString()
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:
hashCode
in 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:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(RTCNodeKey obj)
Implements java.jang.Comparable since this is a key to a tree map- Specified by:
compareTo
in interfacejava.lang.Comparable<RTCNodeKey>
- Parameters:
obj
- aRTCNodeKey
object.- Returns:
- a int.
-
toString
public java.lang.String toString()
Returns a string representation of this key- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this key
-
-