public class IntRange
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
IntRange()
Initializes a new instance of the IntRange class.
|
IntRange(int min,
int max)
Initializes a new instance of the IntRange class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getMax()
Get Maximum value of the range.
|
int |
getMin()
Get minimum value of the range.
|
int |
hashCode() |
boolean |
isInside(int x)
Check if the specified range is inside of the range.
|
boolean |
IsOverlapping(IntRange range)
Check if the specified range overlaps with the range.
|
double |
length()
Length of the range (difference between maximum and minimum values).
|
void |
setMax(int max)
Set maximum value of the range.
|
void |
setMin(int min)
Set minimum value of the range.
|
DoubleRange |
toDoubleRange()
Convert IntRange to DoubleRange.
|
FloatRange |
toFloatRange()
Convert IntRange to FloatRange.
|
java.lang.String |
toString() |
public IntRange()
public IntRange(int min,
int max)
min - Minimum value of the range.max - Maximum value of the range.public int getMin()
public void setMin(int min)
min - Minimum value.public int getMax()
public void setMax(int max)
max - Maximum value.public double length()
public boolean isInside(int x)
x - Value.public boolean IsOverlapping(IntRange range)
range - IntRange.public FloatRange toFloatRange()
public DoubleRange toDoubleRange()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object