public class DataRange extends Object
| Modifier and Type | Field and Description |
|---|---|
protected double |
max |
protected double |
min |
| Constructor and Description |
|---|
DataRange()
Creates a new
DataRange that is not defined. |
DataRange(DataRange range)
Creates a copy of the specified data range.
|
DataRange(double min,
double max)
Creates a new
DataRange with the specified min and max values. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(DataRange range)
Add the specified data range to this range.
|
boolean |
add(double value)
Adds value to this range.
|
boolean |
add(double[] values)
Adds values to this range.
|
boolean |
add(double[] values,
int nLength)
Adds values to this range.
|
boolean |
clear()
Empties this DataRange.
|
boolean |
contains(double value)
Examines if this range contains the specified value.
|
boolean |
equals(Object obj) |
double |
getLength()
Returns length of this range (max - min).
|
double |
getMax() |
double |
getMin() |
int |
hashCode() |
boolean |
isDefined()
Determines if this DataRange is defined -
min and max values are defined. |
boolean |
isMaxDefined()
Determines if
max value has been defined. |
boolean |
isMinDefined()
Determines if
min value has been defined. |
boolean |
set(DataRange range)
Sets updates range to the specified one.
|
boolean |
set(double min,
double max)
Sets
min and max values for this range. |
boolean |
setMax(double max)
Sets
max value for this range. |
boolean |
setMin(double min)
Sets
min value for this range. |
String |
toString() |
public DataRange()
DataRange that is not defined.isDefined()public DataRange(DataRange range)
range - other DataRange objectpublic DataRange(double min,
double max)
DataRange with the specified min and max values.min - the new min valuemax - the new max valuepublic boolean add(DataRange range)
range - other DataRangetrue if the value becomes min or max.public boolean add(double value)
value - value to be addedtrue if the value becomes min or max.public boolean add(double[] values)
values - values to be addedtrue if the value becomes min or max.public boolean add(double[] values,
int nLength)
values - values to be addednLength - the maximum array length that should be taken into accounttrue if the value becomes min or max.public boolean clear()
true if the values were valid beforeisDefined()public boolean contains(double value)
value - to be testedpublic double getLength()
public double getMax()
public double getMin()
public boolean isDefined()
min and max values are defined.public boolean isMaxDefined()
max value has been defined.public boolean isMinDefined()
min value has been defined.public boolean set(DataRange range)
range - other DataRange objecttrue if the value becomes min or max.public boolean set(double min,
double max)
min and max values for this range.min - new minimum of the rangemax - new maximum of the rangetrue if the values becomes the new min or max.public boolean setMax(double max)
max value for this range.max - the new max valuetrue if the value becomes the new max.public boolean setMin(double min)
min value for this range.min - the new data range minimumtrue if the value becomes the new min.Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.