org.geotools.referencing.piecewise
Class DefaultDomainElement1D

Object
  extended by DefaultDomainElement1D
All Implemented Interfaces:
Serializable, Comparable<DomainElement1D>, DomainElement1D
Direct Known Subclasses:
DefaultPiecewiseTransform1DElement

public class DefaultDomainElement1D
extends Object
implements DomainElement1D

This class implements the DomainElement1D interface in order to provide basic capabilities for DomainElement1D subclasses.

Author:
Simone Giannecchini, GeoSolutions.
See Also:
Serialized Form
Module:
modules/library/render (gt-render.jar)

Constructor Summary
DefaultDomainElement1D(CharSequence name, NumberRange<?> inputRange)
          Abstract domain element constructor.
 
Method Summary
 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(NumberRange<? extends Number> 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 DomainElement1Ds.
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.
 InternationalString getName()
          Getter method for this DomainElement1D 's name.
 NumberRange<? extends Number> 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()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultDomainElement1D

public DefaultDomainElement1D(CharSequence name,
                              NumberRange<?> inputRange)
                       throws IllegalArgumentException
Abstract domain element constructor.

It builds up an DefaultDomainElement1D with the provided name and input range.

Parameters:
name - for this DefaultDomainElement1D.
range - for this DefaultDomainElement1D.
Throws:
IllegalArgumentException - in case one of the input arguments is invalid.
Method Detail

compareTo

public int compareTo(DomainElement1D o)
Base implementation for the Comparable.compareTo(Object) method. This method will work only if the provided input object is a DefaultDomainElement1D.

Two DefaultDomainElement1Ds are compared by comparing their lower bounds in order to establish an order between them.

Specified by:
compareTo in interface Comparable<DomainElement1D>
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.
See Also:
Comparable.compareTo(Object)

equals

public boolean equals(Object obj)
Implementation of Object.equals(Object) for DomainElement1Ds.

Two DefaultDomainElement1Ds are considered to be equal if they have the same inputr range and the same name.

Specified by:
equals in interface DomainElement1D
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.equals(Object)

getEquivalenceClass

protected Class<?> getEquivalenceClass()

contains

public boolean contains(Number value)
Description copied from interface: DomainElement1D
This methods can be used to check whether or not a given value belongs to DomainElement1D.

Specified by:
contains in interface DomainElement1D
Parameters:
value - to check for the inclusion.
Returns:
true if the value belongs to this DomainElement1D, false otherwise.
See Also:
DomainElement1D.contains(Number)

contains

public boolean contains(NumberRange<? extends Number> range)
Description copied from interface: DomainElement1D
This methods can be used to check whether or not a given NumberRange belongs to DomainElement1D.

Specified by:
contains in interface DomainElement1D
Returns:
true if the NumberRange belongs to this DomainElement1D, false otherwise.
See Also:
DomainElement1D.contains(NumberRange)

contains

public boolean contains(double value)
Description copied from interface: DomainElement1D
This methods can be used to check whether or not a given value belongs to DomainElement1D.

Specified by:
contains in interface DomainElement1D
Parameters:
value - to check for the inclusion.
Returns:
true if the value belongs to this DomainElement1D, false otherwise.
See Also:
DomainElement1D.contains(double)

hashCode

public int hashCode()
Returns a hash value for this domain element. This value need not remain consistent between different implementations of the same class.

Overrides:
hashCode in class Object

getName

public InternationalString getName()
Getter method for this DomainElement1D 's name.

Specified by:
getName in interface DomainElement1D
Returns:
this DefaultDomainElement1D 's name.
UML property:
name="name"

getInputMaximum

public double getInputMaximum()
Retrieves the upper bound of the range where this DomainElement1D is defined.

This is just a convenience method

Returns:
the upper bound of the range where this DomainElement1D is defined.
UML property:
name="inputMaximum"

isInputMaximumInfinite

public 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

Returns:
true if the upper bound of the range where this DomainElement1D is defined is infinite, false otherwise.

isInputMaximumNaN

public boolean isInputMaximumNaN()
Tells us if the upper bound of the range where this DomainElement1D is defined is NaN.

This is just a convenience method

Returns:
true if the upper bound of the range where this DomainElement1D is defined is NaN, false otherwise.
UML property:
name="inputMaximumNaN"

getInputMinimum

public double getInputMinimum()
Retrieves the lower bound of the range where this DomainElement1D is defined.

This is just a convenience method

Returns:
the lower bound of the range where this DomainElement1D is defined.
UML property:
name="inputMinimum"

isInputMinimumInfinite

public boolean isInputMinimumInfinite()
Tells us if the lower bound of the range where this DomainElement1D is defined is an infinite number.

This is just a convenience method

Returns:
true if the lower bound of the range where this DomainElement1D is defined is infinite, false otherwise.

getRange

public NumberRange<? extends Number> getRange()
This method retrieves the input range.

Specified by:
getRange in interface DomainElement1D
Returns:
the input range.
UML property:
name="range"

isInputMinimumNaN

public boolean isInputMinimumNaN()
Tells us if the lower bound of the range where this DomainElement1D is defined is NaN

This is just a convenience method

Returns:
true if the lower bound of the range where this DomainElement1D is defined is NaN, false otherwise.
UML property:
name="inputMinimumNaN"

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2009 Geotools. All Rights Reserved.