API / geotoolkit / util / Range / Range
Represents a data range, with low and high value
Constructors
| [new Range()](/solutions/geotoolkit/apis/classes/geotoolkit.util.range.range.md#new range()) | [new Range(low, high)](/solutions/geotoolkit/apis/classes/geotoolkit.util.range.range.md#new range(low, high)) | [new Range(options)](/solutions/geotoolkit/apis/classes/geotoolkit.util.range.range.md#new range(options)) |
|---|---|---|
| [new Range(range)](/solutions/geotoolkit/apis/classes/geotoolkit.util.range.range.md#new range(range)) |
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
high | number | Upper range boundary |
low | number | Lower range boundary |
max | number | |
min | number |
Constructors
• new Range()
• new Range(low, high)
| Name | Type | Description |
|---|---|---|
low | number | Lower range boundary |
high | number | Upper range boundary |
• new Range(options)
| Name | Type |
|---|---|
options | Options |
• new Range(range)
| Name | Type |
|---|---|
range | Range |
Accessors
• get high(): number
Returns upper range boundary
Name
module:geotoolkit/util/Range~Range#high
number
• get low(): number
Returns lower range boundary
Name
module:geotoolkit/util/Range~Range#low
number
• Static get Infinite(): Range
A Range instance that represents infinite range
Methods
▸ clone(): Range
Return clone object.
clone a copy of this object
▸ contains(range): boolean
Check if range contains another range or value
| Name | Type | Description |
|---|---|---|
range | number | Range | The range to check containment with current one or value |
boolean
▸ equalsRange(range, epsilon?): boolean
returns true if the Ranges are equal
| Name | Type | Description |
|---|---|---|
range | Range | range to compare to |
Optional epsilon | number | acceptance criteria |
boolean
if these two ranges are equal
▸ getClassName(): string
string
▸ getHigh(): number
Gets upper range boundary
number
high value
▸ getLow(): number
Gets lower range boundary
number
lower range boundary
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
Example
{'low': 0, 'high': 1}▸ getSize(): number
return the size of the range
number
▸ intersect(low, high): Range
Intersect this Range and the specified one. This range will be affected.
| Name | Type | Description |
|---|---|---|
low | number | lower range boundary |
high | number | Upper range boundary |
this
▸ intersect(range): Range
Intersect this Range and the specified one. This range will be affected.
| Name | Type | Description |
|---|---|---|
range | Range | range |
this
▸ intersects(low, high): boolean
Determines whether this Range and the specified Range have intersection.
Two ranges intersect if their intersection size is longer than 0.
| Name | Type | Description |
|---|---|---|
low | number | lower range boundary |
high | number | Upper range boundary |
boolean
▸ intersects(range): boolean
Determines whether this Range and the specified Range have intersection.
Two ranges intersect if their intersection size is longer than 0.
| Name | Type | Description |
|---|---|---|
range | Range | range or lower range boundary |
boolean
▸ setHigh(high): Range
Sets upper range boundary
| Name | Type | Description |
|---|---|---|
high | number | New upper boundary |
▸ setLow(low): Range
Sets lower range boundary
| Name | Type | Description |
|---|---|---|
low | number | New low boundary |
▸ setProperties(properties?): Range
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
▸ setRange(low, high): Range
Sets a new range with given lower and upper boundaries. This method checks if low is less than high otherwise swaps limits
| Name | Type | Description |
|---|---|---|
low | number | Lower range boundary |
high | number | Upper range boundary |
▸ setRange(range): Range
| Name | Type |
|---|---|
range | Range |
▸ toString(): string
Returns string representation
string
▸ union(range): void
Union this Range with the specified
| Name | Type | Description |
|---|---|---|
range | Range | The range to union with current one |
void
▸ Static fromObject(object?): Range
Create or get range from object
range
▸ Static getClassName(): string
string
▸ Static subtract(first, second): Range[]
Subtract second range from the first range and returns result as array of non-overlapping contiguous ranges.
Range[]
array of ranges