gov.noaa.pmel.util
Class Range2D

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

public class Range2D
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Contains minimum, maximum, and delta double values.

Since:
sgt 1.0
Author:
Donald Denbo
See Also:
Serialized Form

Field Summary
 double delta
          The value of the increment
 double end
          The range's last value
 double start
          The range's first value
 
Constructor Summary
Range2D()
          Default constructor.
Range2D(double ustart, double uend)
          Construct Range2D with start and end.
Range2D(double ustart, double uend, double udel)
          Range2D constructor.
 
Method Summary
 void add(Range2D range)
          Adds the Range2D object to this Range2D.
 Range2D copy()
          Create a copy of Range2D object.
 boolean equals(Range2D r)
          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 double start
The range's first value

end

public double end
The range's last value

delta

public double delta
The value of the increment
Constructor Detail

Range2D

public Range2D()
Default constructor.

Range2D

public Range2D(double ustart,
               double uend)
Construct Range2D with start and end. Default for delta is NaN
Parameters:
ustart - first value
uend - last value

Range2D

public Range2D(double ustart,
               double uend,
               double udel)
Range2D constructor.
Parameters:
ustart - first value
uend - last value
udel - increment value
Method Detail

add

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

equals

public boolean equals(Range2D r)
Test for equality. Both start, end, and delta must 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.

copy

public Range2D copy()
Create a copy of Range2D 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