gov.noaa.pmel.util
Class TimeRange

java.lang.Object
  |
  +--gov.noaa.pmel.util.TimeRange
All Implemented Interfaces:
java.io.Serializable

public class TimeRange
extends java.lang.Object
implements java.io.Serializable

Contains minimum and maximum Time values.

Since:
sgt 1.0
Version:
$Revision: 1.4 $, $Date: 2001/02/09 18:42:30 $
Author:
Donald Denbo
See Also:
Serialized Form

Field Summary
 GeoDate delta
          The range's time increment
 GeoDate end
          The range's last time
 GeoDate start
          The range's first time
 
Constructor Summary
TimeRange()
          the Default constructor
TimeRange(GeoDate tstart, GeoDate tend)
          Constructor
TimeRange(GeoDate tstart, GeoDate tend, GeoDate tdelta)
          Constructor
 
Method Summary
 void add(TimeRange trange)
          Adds the TimeRange object to this TimeRange.
 boolean equals(TimeRange tr)
          Test for equality.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start

public GeoDate start
The range's first time

end

public GeoDate end
The range's last time

delta

public GeoDate delta
The range's time increment
Constructor Detail

TimeRange

public TimeRange()
the Default constructor

TimeRange

public TimeRange(GeoDate tstart,
                 GeoDate tend)
Constructor
Parameters:
tstart - first time
tend - last time

TimeRange

public TimeRange(GeoDate tstart,
                 GeoDate tend,
                 GeoDate tdelta)
Constructor
Parameters:
tstart - first time
tend - last time
delta - time increment
Method Detail

add

public void add(TimeRange trange)
Adds the TimeRange object to this TimeRange. The resulting TimeRange is the smallest TimeRange that contains both the origial TimeRange and the specified TimeRange.

equals

public boolean equals(TimeRange tr)
Test for equality. The start, end, and delta must all be equal for equality.

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 
Overrides:
toString in class java.lang.Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001