public final class IlvDataInterval extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
double |
max
The interval maximum bound.
|
double |
min
The interval minimum bound.
|
Constructor and Description |
---|
IlvDataInterval()
Creates an empty
IlvDataInterval object. |
IlvDataInterval(double min,
double max)
Creates a new
IlvDataInterval object. |
IlvDataInterval(IlvDataInterval itv)
Creates a new
IlvDataInterval object from the
given interval. |
Modifier and Type | Method and Description |
---|---|
boolean |
add(double val)
Adds the given value to this interval.
|
boolean |
add(IlvDataInterval itv)
Adds the given interval.
|
double |
clamp(double value)
Clamps the specified value to this interval.
|
Object |
clone()
Returns a copy of this data interval.
|
boolean |
contains(IlvDataInterval itv)
Returns whether the given interval is included within this interval.
|
void |
empty()
Empties this interval.
|
boolean |
equals(Object obj)
Returns whether this data interval is equal to the specified data
interval.
|
void |
expand(double delta)
Expands the interval from the given value.
|
double |
getLength()
Returns the length of this interval.
|
double |
getMax()
Returns the maximum bound.
|
double |
getMiddle()
Returns the middle value of this interval.
|
double |
getMin()
Returns the minimum bound.
|
void |
intersection(IlvDataInterval itv)
Computes the intersection of this interval with the given interval and
modifies this data interval accordingly.
|
boolean |
intersects(IlvDataInterval itv)
Returns whether the given interval intersects this interval.
|
boolean |
isAfter(double val)
Returns whether the given value is greater than or equal to the maximum
bound.
|
boolean |
isBefore(double val)
Returns whether the given value is lower than or equal to the minimum bound.
|
boolean |
isEmpty()
Returns whether this interval is empty.
|
boolean |
isInside(double val)
Returns whether the given value is included within this interval.
|
boolean |
isOutside(double val)
Returns whether the given value lies outside this interval.
|
boolean |
isStrictlyAfter(double val)
Returns whether the given value is strictly greater than the maximum
bound.
|
boolean |
isStrictlyBefore(double val)
Returns whether the given value is strictly lower than the minimum bound.
|
boolean |
isStrictlyInside(double val)
Returns whether the given value is strictly included within this interval.
|
boolean |
isStrictlyOutside(double val)
Returns whether the given value lies strictly outside this interval.
|
void |
set(double min,
double max)
Sets the minimum and maximum bounds.
|
void |
setMax(double val)
Sets the maximum bound.
|
void |
setMin(double val)
Sets the minimum bound.
|
void |
subtract(IlvDataInterval itv)
Subtracts the given interval.
|
String |
toString()
Returns a string representation of this data interval.
|
void |
translate(double delta)
Translates the interval from the given value.
|
public double min
public double max
public IlvDataInterval()
IlvDataInterval
object.public IlvDataInterval(double min, double max)
IlvDataInterval
object.min
- The minimum bound.max
- The maximum bound.public IlvDataInterval(IlvDataInterval itv)
IlvDataInterval
object from the
given interval.public void empty()
public boolean isEmpty()
empty()
public double getMin()
public void setMin(double val)
public double getMax()
public void setMax(double val)
public void set(double min, double max)
public boolean isBefore(double val)
public boolean isStrictlyBefore(double val)
public boolean isAfter(double val)
public boolean isStrictlyAfter(double val)
public boolean isInside(double val)
public boolean isStrictlyInside(double val)
public boolean isOutside(double val)
public boolean isStrictlyOutside(double val)
public boolean contains(IlvDataInterval itv)
public void translate(double delta)
min+delta, max+delta
.public void expand(double delta)
min-delta, max+delta
. This method has no effects on
an empty interval.public boolean intersects(IlvDataInterval itv)
public boolean add(double val)
public boolean add(IlvDataInterval itv)
The method also distinguishes two specific cases:
public void subtract(IlvDataInterval itv)
public void intersection(IlvDataInterval itv)
public double getLength()
public double getMiddle()
public double clamp(double value)
public boolean equals(Object obj)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.