sophware.home.util
Class TimePeriod

java.lang.Object
  extended by sophware.home.lang.StateObject
      extended by sophware.home.lang.BinaryObject
          extended by sophware.home.util.TimePeriod
All Implemented Interfaces:
java.io.Serializable, Named

public class TimePeriod
extends BinaryObject
implements Named, java.io.Serializable

TimePeriod is "on" between the defined start/end times.

Version:
1.0, 02/17/06
Author:
Russell Soph
See Also:
Serialized Form

Field Summary
 
Fields inherited from class sophware.home.lang.BinaryObject
OFF, ON
 
Constructor Summary
TimePeriod(java.lang.String name, int startHour, int startMin, int endHour, int endMin)
          Creates a TimePeriod with the name and duration
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getEndHour()
          Get the end hour
 int getEndMinute()
          Get the end minute
 java.lang.String getName()
          Get the name
 int getStartHour()
          Get the start hour
 int getStartMinute()
          Get the start minute
 
Methods inherited from class sophware.home.lang.BinaryObject
isOn, setOn, stateEquals
 
Methods inherited from class sophware.home.lang.StateObject
addStateChangeListener, fireStateChange, removeStateChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimePeriod

public TimePeriod(java.lang.String name,
                  int startHour,
                  int startMin,
                  int endHour,
                  int endMin)
Creates a TimePeriod with the name and duration

Parameters:
name - name of this group
startHour - start hour of the time period
startMin - start minute of the time period
endHour - end hour of the time period
endMin - end minute of the time period
Method Detail

getName

public java.lang.String getName()
Get the name

Specified by:
getName in interface Named
Returns:
the name

getStartHour

public int getStartHour()
Get the start hour

Returns:
start hour

getStartMinute

public int getStartMinute()
Get the start minute

Returns:
start minute

getEndHour

public int getEndHour()
Get the end hour

Returns:
end hour

getEndMinute

public int getEndMinute()
Get the end minute

Returns:
end minute

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object