public abstract class Range extends Object
UnsupportedOperationException
but for every subclass one of these methods is overridden with the correct functionality. These 6 methods are different only for the data type
used. In this way it is possible to reach a better performance by using primitive variables than generic. All the subclasses can contain a Range
composed by a minimum and a maximum or a single-point Range. For Double and Float data type the NaN data can be used only with a single-point
Range.Modifier and Type | Class and Description |
---|---|
static class |
Range.DataType |
Modifier and Type | Field and Description |
---|---|
protected boolean |
isMaxIncluded |
protected boolean |
isMinIncluded |
Modifier and Type | Method and Description |
---|---|
int |
compare(Range other) |
boolean |
contains(byte value)
Method for checking if a byte value is contained inside the Range
|
boolean |
contains(double value)
Method for checking if a double value is contained inside the Range
|
boolean |
contains(float value)
Method for checking if a float value is contained inside the Range
|
boolean |
contains(int value)
Method for checking if an integer value is contained inside the Range
|
boolean |
contains(long value)
Method for checking if a long value is contained inside the Range
|
boolean |
contains(Range other) |
boolean |
contains(short value)
Method for checking if a short/ushort value is contained inside the Range
|
<T extends Number> |
containsN(T value)
Method for checking if a Generic value is contained inside the Range
|
boolean |
equals(Object obj) |
abstract Range.DataType |
getDataType()
Returns the Range data Type
|
abstract Number |
getMax()
Returns the maximum bound of the Range
|
abstract Number |
getMax(boolean isMaxIncluded)
Returns the maximum bound of the Range or the nearest one if not included
|
abstract Number |
getMin()
Returns the minimum bound of the Range
|
abstract Number |
getMin(boolean isMinIncluded)
Returns the minimum bound of the Range or the nearest one if not included
|
static int |
hash(boolean value,
int seed) |
static int |
hash(double value,
int seed) |
static int |
hash(long value,
int seed) |
int |
hashCode() |
boolean |
intersects(Range other) |
boolean |
isMaxIncluded()
Returns the a boolean indicating if the Maximum bound is included
|
boolean |
isMinIncluded()
Returns the a boolean indicating if the Minimum bound is included
|
boolean |
isNaN()
Returns true if and only if the current Range is a point representing NaN
|
boolean |
isNanIncluded()
Returns true if the current Range accepts NaN values
|
abstract boolean |
isPoint()
Indicates if the Range is a degenerated single point Range or not
|
protected void |
setMaxIncluded(boolean isMaxIncluded)
Sets the isMaxIncluded parameter
|
protected void |
setMinIncluded(boolean isMinIncluded)
Sets the isMinIncluded parameter
|
String |
toString() |
abstract Range |
union(Range other) |
protected boolean isMinIncluded
protected boolean isMaxIncluded
public boolean contains(byte value)
public boolean contains(short value)
public boolean contains(int value)
public boolean contains(float value)
public boolean contains(double value)
public boolean contains(long value)
public <T extends Number> boolean containsN(T value)
public boolean contains(Range other)
public boolean intersects(Range other)
public abstract Range.DataType getDataType()
public abstract boolean isPoint()
public abstract Number getMax()
public abstract Number getMin()
public abstract Number getMax(boolean isMaxIncluded)
public abstract Number getMin(boolean isMinIncluded)
public boolean isNanIncluded()
public boolean isNaN()
public boolean isMaxIncluded()
public boolean isMinIncluded()
protected void setMinIncluded(boolean isMinIncluded)
protected void setMaxIncluded(boolean isMaxIncluded)
public int compare(Range other)
public static int hash(boolean value, int seed)
public static int hash(double value, int seed)
public static int hash(long value, int seed)
Copyright © 2006–2015 GeoSolutions. All rights reserved.