| java.lang.Object | |
| ↳ | com.carto.core.MapRange |
A container class that defines a half closed range of values using minimum and maximum values.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
MapRange()
Constructs a MapRange object.
| |||||||||||
|
MapRange(float min, float max)
Constructs a MapRange object from min and max values.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| synchronized void | delete() | ||||||||||
| boolean |
equals(Object obj)
Checks if this object is equal to the specified object.
| ||||||||||
| float |
getMax()
Returns the max value of this map range.
| ||||||||||
| float |
getMidrange()
Calculate the midrange value.
| ||||||||||
| float |
getMin()
Returns the min value of this map range.
| ||||||||||
| int |
hashCode()
Returns the hash value of this object.
| ||||||||||
| boolean |
inRange(float value)
Tests if a value is in this map range.
| ||||||||||
| float |
length()
Calculates the length of this map range.
| ||||||||||
| String |
toString()
Creates a string representation of this map range, useful for logging.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Constructs a MapRange object. The minimum value will be set to positive infinity
and the maximum value to negative infinity.
Constructs a MapRange object from min and max values.
If min > max, the values will be swapped internally.
| min | The min value. |
|---|---|
| max | The max value. |
Checks if this object is equal to the specified object.
| obj | The reference object. |
|---|
Returns the max value of this map range.
Calculate the midrange value.
Returns the min value of this map range.
Returns the hash value of this object.
Tests if a value is in this map range. Value is considered in range if min <= val < max.
| value | The value to be tested. |
|---|
Calculates the length of this map range. Defined as max - min.
Creates a string representation of this map range, useful for logging.