public class NumberRange
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
NumberRange()
Creates a range of the number values.
|
NumberRange(double lower,
double upper)
Creates a range for the number values given.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
getLowerBound()
Returns the manually set lower bound of this range.
|
java.lang.Double |
getUpperBound()
Returns the manually set upper bound of this range.
|
boolean |
isAutoRange()
Returns whether or not the range will be defined automatically instead of using
the manually set values.
|
void |
setAutoRange(boolean autoRange)
Sets whether or not the range will be defined automatically instead of using the
manually set values.
|
void |
setLowerBound(java.lang.Double lower)
Manually sets the lower bound of this range.
|
void |
setUpperBound(java.lang.Double upper)
Sets the manually set upper bound of this range.
|
public NumberRange()
public NumberRange(double lower, double upper)
lower
- the lower bound of rangeupper
- the upper bound of rangejava.lang.IllegalArgumentException
- if the upper value is less than the lower valuepublic boolean isAutoRange()
setAutoRange(boolean)
public void setAutoRange(boolean autoRange)
autoRange
- whether the range will be defined automaticallyisAutoRange()
public java.lang.Double getLowerBound()
null
if this bound was not setsetLowerBound(Double)
,
setAutoRange(boolean)
public void setLowerBound(java.lang.Double lower)
lower
- the lower bound of this rangejava.lang.IllegalArgumentException
- if the parameter is greater than upper bound.getLowerBound()
public java.lang.Double getUpperBound()
null
if this bound was not set.setUpperBound(Double)
public void setUpperBound(java.lang.Double upper)
upper
- the upper bound of this rangejava.lang.IllegalArgumentException
- if the parameter is less than lower bound.getUpperBound()
Copyright © 1999-2020 by i-net software GmbH