edu.ull.cgunay.plots
Class Range

java.lang.Object
  |
  +--edu.ull.cgunay.plots.Range

public class Range
extends Object

Holds the pair of doubles indicating a range of a variable.

Created: Mon Apr 8 17:15:38 2002

Modified: $Date: 2002/12/17 00:58:57 $

Version:
$Revision: 1.5 $ for this file.
Author:
Cengiz Gunay
See Also:
Grapher

Field Summary
(package private)  double end
          End of the range.
(package private)  double start
          Start of the range.
 
Constructor Summary
Range(double start, double end)
           
 
Method Summary
 void add(Range range)
          Adds given range to this one, resulting in enlarging this range.
 double getEnd()
          Get the value of end.
 double getStart()
          Get the value of start.
static Range max(Range r1, Range r2)
          Returns the union of two ranges, that is the maximal range including both ranges.
 void setEnd(double v)
          Set the value of end.
 void setStart(double v)
          Set the value of start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

double start
Start of the range.


end

double end
End of the range.

Constructor Detail

Range

public Range(double start,
             double end)
Method Detail

getStart

public double getStart()
Get the value of start.

Returns:
value of start.

setStart

public void setStart(double v)
Set the value of start.

Parameters:
v - Value to assign to start.

getEnd

public double getEnd()
Get the value of end.

Returns:
value of end.

setEnd

public void setEnd(double v)
Set the value of end.

Parameters:
v - Value to assign to end.

add

public void add(Range range)
Adds given range to this one, resulting in enlarging this range.

Parameters:
range - a Range value

max

public static Range max(Range r1,
                        Range r2)
Returns the union of two ranges, that is the maximal range including both ranges.

Parameters:
r1 - a Range value
r2 - a Range value
Returns:
a Range value