com.universaldevices.device.model
Class DeviceNodeMap

java.lang.Object
  extended by com.universaldevices.device.model.DeviceNodeMap
All Implemented Interfaces:
java.lang.Comparable

public class DeviceNodeMap
extends java.lang.Object
implements java.lang.Comparable

This class represents the relationship between a node and a device. As we can have multiple devices (ISYs) on the network, this class maps each node to its associated device

Author:
UD Architect

Field Summary
 java.lang.String address
          The address of the UDNode
 UDProxyDevice device
          The the logical representation of ISY
 
Constructor Summary
DeviceNodeMap(UDProxyDevice device, java.lang.String address)
          Constructor
 
Method Summary
 int compareTo(java.lang.Object arg0)
           
 boolean equals(java.lang.Object address)
          Tests for equality
 boolean equals(UDProxyDevice device, java.lang.String address)
          Tests for equality
 java.lang.String toString()
          Returns the node's address
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

device

public UDProxyDevice device
The the logical representation of ISY


address

public java.lang.String address
The address of the UDNode

Constructor Detail

DeviceNodeMap

public DeviceNodeMap(UDProxyDevice device,
                     java.lang.String address)
Constructor

Parameters:
device - - the device
address - - the node address
Method Detail

toString

public java.lang.String toString()
Returns the node's address

Overrides:
toString in class java.lang.Object
Returns:
- node's address

equals

public boolean equals(UDProxyDevice device,
                      java.lang.String address)
Tests for equality

Tests whether or not a device and adddress combination is the same as this instance of the class (object)

Parameters:
device - - a UDProxyDevice
address - - node's address
Returns:
true if equal false otherwise

equals

public boolean equals(java.lang.Object address)
Tests for equality

Tests Whether or not another object of DeviceNodeMap is equal to this instance the same as this instance of the class (object)

Overrides:
equals in class java.lang.Object
Parameters:
address - - node's address
Returns:
true if equal false otherwise

compareTo

public int compareTo(java.lang.Object arg0)
Specified by:
compareTo in interface java.lang.Comparable