java.io.Serializablepublic class Range
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected double |
m_max |
The upper bound of this range.
|
protected double |
m_min |
The lower bound of this range.
|
static Range |
RANGE_UNBOUNDED |
The unbounded range.
|
| Constructor | Description |
|---|---|
Range(double min,
double max) |
Constructs a new Range that covers the given bounds.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
ensureContained(double contain) |
Force this Range to cover the given value.
|
boolean |
equals(java.lang.Object obj) |
|
double |
getExtent() |
Returns the extent of this range.
|
double |
getMax() |
Returns the upper bound of this range.
|
double |
getMin() |
Returns the lower bound of this range.
|
int |
hashCode() |
|
boolean |
isContained(double contained) |
Returns true if the given value is covered by this range.
|
void |
mimic(Range r) |
Mutator that shifts this range to the given one.
|
void |
setMax(double max) |
Sets the max value of this range.
|
void |
setMin(double min) |
Sets the min value of this range.
|
java.lang.String |
toString() |
public static final Range RANGE_UNBOUNDED
protected double m_max
protected double m_min
public Range(double min,
double max)
min - the lower bound for the range.max - the upper bound for the range.public boolean ensureContained(double contain)
contain - the value that has to be contained within this range.public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public double getExtent()
public double getMax()
public double getMin()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isContained(double contained)
contained - the value to test wether it is contained within this range.public void mimic(Range r)
This is support for "clone" without allocations in case range instances are reused.
r - the range to copy from.public final void setMax(double max)
max - the max to set.public final void setMin(double min)
min - the min to setpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()Copyright © 2001 - 2010 LGPL, All Rights Footloose.