- java.lang.Object
-
- org.arakhne.afc.math.DoubleRange
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<DoubleRange>
public class DoubleRange extends Object implements Cloneable, Serializable, Comparable<DoubleRange>
A range of double floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:41
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgen
-
-
Constructor Summary
Constructors Constructor Description DoubleRange(double min, double max)Construct a range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleRangeclone()intcompareTo(DoubleRange range)booleancontains(double value)Replies if the value is inside the range.booleanequals(Object obj)doublegetMax()Replies the maximum value.doublegetMin()Replies the minimum value.inthashCode()StringtoString()
-
-
-
Method Detail
-
clone
public DoubleRange clone()
-
getMin
@Pure public double getMin()
Replies the minimum value.- Returns:
- the minimum value.
-
getMax
@Pure public double getMax()
Replies the maximum value.- Returns:
- the maximum value.
-
contains
@Pure public boolean contains(double value)
Replies if the value is inside the range.- Parameters:
value- the value.- Returns:
trueif the value is in the range;falseotherwise.
-
compareTo
@Pure public int compareTo(DoubleRange range)
- Specified by:
compareToin interfaceComparable<DoubleRange>
-
-