sophware.home.lang
Class DeviceAddress

java.lang.Object
  extended by sophware.home.lang.DeviceAddress
Direct Known Subclasses:
InsteonAddress, X10Address

public abstract class DeviceAddress
extends java.lang.Object

DeviceAddress uniquely identifies a Device on a home network

Version:
1.0, 03/19/07
Author:
Russell Soph

Constructor Summary
DeviceAddress()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equals returns true if two addresses are equal.
abstract  int getAddress()
          The getAddress method returns an integer representation of the address.
abstract  HomeCommand getBrightCommand()
          gets bright command for this address
abstract  HomeCommand getDimCommand()
          gets dim command for this address
abstract  HomeCommand getHailCommand()
          gets hail command for this address
abstract  HomeCommand getOffCommand()
          gets off command for this address
abstract  HomeCommand getOnCommand()
          gets on command for this address
abstract  HomeCommand getOnCommand(int level)
          gets command to turn on to a specific level
abstract  HomeCommand getStatusRequestCommand()
          gets status request comand for this address
 int hashCode()
          HashCode is used by containers such as HashTable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceAddress

public DeviceAddress()
Method Detail

equals

public boolean equals(java.lang.Object obj)
Equals returns true if two addresses are equal. This implementation relies on the getAddress method.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to be compared.
Returns:
true/false if objects are equal.

hashCode

public int hashCode()
HashCode is used by containers such as HashTable.

Overrides:
hashCode in class java.lang.Object
Returns:
integer unique to this address

getAddress

public abstract int getAddress()
The getAddress method returns an integer representation of the address. This integer is used as the objects hashCode and as such it must adhere to that method's constraints.

Returns:
integer unique to this address

getOnCommand

public abstract HomeCommand getOnCommand()
gets on command for this address

Returns:
the command

getOnCommand

public abstract HomeCommand getOnCommand(int level)
gets command to turn on to a specific level

Parameters:
level - the desired level
Returns:
the command

getOffCommand

public abstract HomeCommand getOffCommand()
gets off command for this address

Returns:
the command

getDimCommand

public abstract HomeCommand getDimCommand()
gets dim command for this address

Returns:
the command

getBrightCommand

public abstract HomeCommand getBrightCommand()
gets bright command for this address

Returns:
the command

getHailCommand

public abstract HomeCommand getHailCommand()
gets hail command for this address

Returns:
the command

getStatusRequestCommand

public abstract HomeCommand getStatusRequestCommand()
gets status request comand for this address

Returns:
the command