org.opennms.netmgt.rtc.datablock
Class RTCNodeKey

java.lang.Object
  extended by org.opennms.netmgt.rtc.datablock.RTCNodeKey
All Implemented Interfaces:
Comparable

public class RTCNodeKey
extends Object
implements Comparable

The key used to look up items in the data map

Author:
Sowmya Kumaraswamy , OpenNMS.org

Constructor Summary
RTCNodeKey(long nodeid, String ip, String svcname)
          the constructor for this class
 
Method Summary
 int compareTo(Object o)
          Implements java.jang.Comparable since this is a key to a treemap
 boolean equals(Object o)
          Overrides the 'equals()' method in the 'Object' superclass
 String getIP()
          Return the IP address
 long getNodeID()
          Return the node ID
 String getSvcName()
          Return the service name
 int hashCode()
          Overrides the 'hashCode()' method in the 'Object' superclass
 void setIP(String ipStr)
          Set the IP address
 void setNodeID(long id)
          Set the node ID
 void setSvcName(String svcName)
          Set the service name
 String toString()
          Returns a string representation of this key
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RTCNodeKey

public RTCNodeKey(long nodeid,
                  String ip,
                  String svcname)
the constructor for this class

Parameters:
nodeid - the node ID
ip - the node IP
svcname - the service in the node
Method Detail

setNodeID

public void setNodeID(long id)
Set the node ID

Parameters:
id - the node ID

setIP

public void setIP(String ipStr)
Set the IP address

Parameters:
ipStr - the ip address

setSvcName

public void setSvcName(String svcName)
Set the service name

Parameters:
svcName - the service name

getNodeID

public long getNodeID()
Return the node ID

Returns:
the node ID

getSvcName

public String getSvcName()
Return the service name

Returns:
the service name

getIP

public String getIP()
Return the IP address

Returns:
the IP address

hashCode

public int hashCode()
Overrides the 'hashCode()' method in the 'Object' superclass

Overrides:
hashCode in class Object
Returns:
a sum of hashCodes of the inidividual attributes

equals

public boolean equals(Object o)
Overrides the 'equals()' method in the 'Object' superclass

Overrides:
equals in class Object
Returns:
true if all the attributes are equal

compareTo

public int compareTo(Object o)
Implements java.jang.Comparable since this is a key to a treemap

Specified by:
compareTo in interface Comparable

toString

public String toString()
Returns a string representation of this key

Overrides:
toString in class Object
Returns:
a string representation of this key


Copyright © 2009. All Rights Reserved.