org.gridlab.gat
Class TimePeriod

java.lang.Object
  extended by org.gridlab.gat.TimePeriod
All Implemented Interfaces:
Serializable

public class TimePeriod
extends Object
implements Serializable

An instance of this class represents a time period.

See Also:
Serialized Form

Constructor Summary
TimePeriod(long startTime, long stopTime)
          This method constructs a TimePeriod instance corresponding to the passed startTime and stopTime.
 
Method Summary
 boolean equals(Object object)
          Tests this TimePeriod for equality with the passed Object.
 long getStartTime()
          Returns the number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period starts, a long
 long getStopTime()
          Returns the number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period stops, a long
 int hashCode()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimePeriod

public TimePeriod(long startTime,
                  long stopTime)
This method constructs a TimePeriod instance corresponding to the passed startTime and stopTime.

Parameters:
startTime - The number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period starts, a long
stopTime - The number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period stops, a long
Method Detail

equals

public boolean equals(Object object)
Tests this TimePeriod for equality with the passed Object.

If the given object is not a TimePeriod, then this method immediately returns false.

If the passed object is a TimePeriod, then it is deemed equal if it has a numerically equivalent start time and a numerically equivalent stop time to the passed TimePeriod instance.

Overrides:
equals in class Object
Parameters:
object - The Object to test for equality
Returns:
A boolean indicating equality

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getStartTime

public long getStartTime()
Returns the number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period starts, a long

Returns:
The number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period starts, a long

getStopTime

public long getStopTime()
Returns the number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period stops, a long

Returns:
The number of milliseconds after January 1, 1970, 00:00:00 GMT when the time period stops, a long