public class DefaultDomainElement1D extends Object implements DomainElement1D
DomainElement1D
interface in order to provide basic capabilities for DomainElement1D
subclasses.Constructor and Description |
---|
DefaultDomainElement1D(CharSequence name,
Range inputRange)
Abstract domain element constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DomainElement1D o)
Base implementation for the
Comparable.compareTo(Object) method. |
boolean |
contains(double value)
This methods can be used to check whether or not a given value belongs to
DomainElement1D . |
boolean |
contains(Number value)
This methods can be used to check whether or not a given value belongs to
DomainElement1D . |
boolean |
contains(Range range)
This methods can be used to check whether or not a given
NumberRange belongs to DomainElement1D . |
boolean |
equals(Object obj)
Implementation of
Object.equals(Object) for DomainElement1D s. |
protected Class<?> |
getEquivalenceClass() |
double |
getInputMaximum()
Retrieves the upper bound of the range where this
DomainElement1D is defined. |
double |
getInputMinimum()
Retrieves the lower bound of the range where this
DomainElement1D is defined. |
String |
getName()
Getter method for this
DomainElement1D 's name. |
Range |
getRange()
This method retrieves the input range.
|
int |
hashCode()
Returns a hash value for this domain element.
|
boolean |
isInputMaximumInfinite()
Tells us if the upper bound of the range where this
DomainElement1D is defined is an infinite number
This is just a convenience method |
boolean |
isInputMaximumNaN()
Tells us if the upper bound of the range where this
DomainElement1D is defined is NaN. |
boolean |
isInputMinimumInfinite()
Tells us if the lower bound of the range where this
DomainElement1D is defined is an infinite number. |
boolean |
isInputMinimumNaN()
Tells us if the lower bound of the range where this
DomainElement1D is defined is NaN
This is just a convenience method |
String |
toString() |
public DefaultDomainElement1D(CharSequence name, Range inputRange) throws IllegalArgumentException
It builds up an DefaultDomainElement1D
with the provided name and input range.
name
- for this DefaultDomainElement1D
.range
- for this DefaultDomainElement1D
.IllegalArgumentException
- in case one of the input arguments is invalid.public int compareTo(DomainElement1D o)
Comparable.compareTo(Object)
method. This method will work only if the provided input object is a
DefaultDomainElement1D
.
Two DefaultDomainElement1D
s are compared by comparing their lower bounds in order to establish an order between them.
compareTo
in interface Comparable<DomainElement1D>
ClassCastException
- if the specified object's type prevents it from being compared to this Object.Comparable.compareTo(Object)
public boolean equals(Object obj)
Object.equals(Object)
for DomainElement1D
s.
Two DefaultDomainElement1D
s are considered to be equal if they have the same inputr range and the same name.
equals
in interface DomainElement1D
equals
in class Object
obj
- the reference object with which to compare.true
if this object is the same as the obj argument; false
otherwise.Object.equals(Object)
protected Class<?> getEquivalenceClass()
public boolean contains(Number value)
DomainElement1D
DomainElement1D
.contains
in interface DomainElement1D
value
- to check for the inclusion.true
if the value belongs to this DomainElement1D
, false
otherwise.DomainElement1D.contains(Number)
public boolean contains(Range range)
DomainElement1D
NumberRange
belongs to DomainElement1D
.contains
in interface DomainElement1D
true
if the NumberRange
belongs to this DomainElement1D
, false
otherwise.DomainElement1D#contains(NumberRange)
public boolean contains(double value)
DomainElement1D
DomainElement1D
.contains
in interface DomainElement1D
value
- to check for the inclusion.true
if the value belongs to this DomainElement1D
, false
otherwise.DomainElement1D.contains(double)
public int hashCode()
public String getName()
DomainElement1D
's name.getName
in interface DomainElement1D
DefaultDomainElement1D
's name.public double getInputMaximum()
DomainElement1D
is defined.
This is just a convenience method
DomainElement1D
is defined.public boolean isInputMaximumInfinite()
DomainElement1D
is defined is an infinite number
This is just a convenience method
true
if the upper bound of the range where this DomainElement1D
is defined is infinite, false
otherwise.public boolean isInputMaximumNaN()
DomainElement1D
is defined is NaN.
This is just a convenience method
true
if the upper bound of the range where this DomainElement1D
is defined is NaN, false
otherwise.public double getInputMinimum()
DomainElement1D
is defined.
This is just a convenience method
DomainElement1D
is defined.public boolean isInputMinimumInfinite()
DomainElement1D
is defined is an infinite number.
This is just a convenience method
true
if the lower bound of the range where this DomainElement1D
is defined is infinite, false
otherwise.public Range getRange()
getRange
in interface DomainElement1D
public boolean isInputMinimumNaN()
DomainElement1D
is defined is NaN
This is just a convenience method
true
if the lower bound of the range where this DomainElement1D
is defined is NaN, false
otherwise.Copyright © 2006–2015 GeoSolutions. All rights reserved.