Package io.jenetics.util
Class DoubleRange
- java.lang.Object
-
- io.jenetics.util.DoubleRange
-
- All Implemented Interfaces:
Serializable
public final class DoubleRange extends Object implements Serializable
Double range class.- Since:
- 3.2
- Version:
- 6.0
- Author:
- Franz Wilhelmstötter
- See Also:
- Serialized Form
- Implementation Note:
- This class is immutable and thread-safe.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
double
max()
Return the maximum value of the double range.double
min()
Return the minimum value of the double range.static DoubleRange
of(double min, double max)
Create a newDoubleRange
object with the givenmin
andmax
values.String
toString()
-
-
-
Method Detail
-
min
public double min()
Return the minimum value of the double range.- Returns:
- the minimum value of the double range
-
max
public double max()
Return the maximum value of the double range.- Returns:
- the maximum value of the double range
-
of
public static DoubleRange of(double min, double max)
Create a newDoubleRange
object with the givenmin
andmax
values.- Parameters:
min
- the lower bound of the double rangemax
- the upper bound of the double range- Returns:
- a new
DoubleRange
object - Throws:
IllegalArgumentException
- ifmin > max
-
-