Catalano.Core
Class DoubleRange
- java.lang.Object
-
- Catalano.Core.DoubleRange
-
- All Implemented Interfaces:
- java.io.Serializable
public class DoubleRange extends java.lang.Object implements java.io.SerializableRepresents a double range with minimum and maximum values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DoubleRange()Initializes a new instance of the DoubleRange class.DoubleRange(double min, double max)Initializes a new instance of the DoubleRange class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)doublegetMax()Get maximum value of the range.doublegetMin()Get minimum value of the range.inthashCode()booleanisInside(double x)Check if the specified range is inside of the range.booleanIsOverlapping(DoubleRange range)Check if the specified range overlaps with the range.doublelength()Length of the range (difference between maximum and minimum values).voidsetMax(double max)Set maximum value of the range.voidsetMin(double min)Set minimum value of the range.FloatRangetoFloatRange()Convert DoubleRange to FloatRange.IntRangetoIntRange()Convert DoubleRange to IntRange.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DoubleRange
public DoubleRange()
Initializes a new instance of the DoubleRange class.
-
DoubleRange
public DoubleRange(double min, double max)Initializes a new instance of the DoubleRange class.- Parameters:
min- Minimum value of the range.max- Maximum value of the range.
-
-
Method Detail
-
getMin
public double getMin()
Get minimum value of the range.- Returns:
- Minimum value.
-
setMin
public void setMin(double min)
Set minimum value of the range.- Parameters:
min- Minimum value.
-
getMax
public double getMax()
Get maximum value of the range.- Returns:
- Maximum value.
-
setMax
public void setMax(double max)
Set maximum value of the range.- Parameters:
max- Maximum value.
-
length
public double length()
Length of the range (difference between maximum and minimum values).- Returns:
- Length.
-
isInside
public boolean isInside(double x)
Check if the specified range is inside of the range.- Parameters:
x- Value.- Returns:
- True if the value is inside of the range, otherwise returns false.
-
IsOverlapping
public boolean IsOverlapping(DoubleRange range)
Check if the specified range overlaps with the range.- Parameters:
range- DoubleRange.- Returns:
- True if the range overlaps with the range, otherwise returns false.
-
toIntRange
public IntRange toIntRange()
Convert DoubleRange to IntRange.- Returns:
- IntRange.
-
toFloatRange
public FloatRange toFloatRange()
Convert DoubleRange to FloatRange.- Returns:
- FloatRange.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG