org.geotools.referencing.piecewise
Interface Domain1D<T extends DomainElement1D>

All Superinterfaces:
Collection<T>, Iterable<T>, List<T>
All Known Subinterfaces:
ColorMapTransform<T>, PiecewiseTransform1D<T>
All Known Implementing Classes:
DefaultDomain1D, DefaultPiecewiseTransform1D, LinearColorMap

public interface Domain1D<T extends DomainElement1D>
extends List<T>

An immutable Domain1D as a list of DomainElement1D. DomainElement1D are sorted by their values. Overlapping ranges are not allowed. ThefindDomainElement(double) method is responsible for finding the right DomainElement1D for an arbitrary domain value.

Author:
Simone Giannecchini, GeoSolutions

Method Summary
 T findDomainElement(double sample)
          Returns the DomainElement1D of the specified sample value.
 NumberRange<? extends Number> getApproximateDomainRange()
          Returns the range of values in this Domain1D.
 InternationalString getName()
          Returns the name of this object.
 boolean hasGaps()
          Tell us if there is a gap in this Domain1D which means a range where no DomainElement1D is defined.
 
Methods inherited from interface List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

getName

InternationalString getName()
Returns the name of this object. The default implementation returns the name of what seems to be the "main" domain element (i.e. the domain element with the widest range of values).


getApproximateDomainRange

NumberRange<? extends Number> getApproximateDomainRange()
Returns the range of values in this Domain1D. This is the union of the range of values of every Domain1D.

Returns:
The range of values.

findDomainElement

T findDomainElement(double sample)
Returns the DomainElement1D of the specified sample value. If no DomainElement1D fits, then this method returns null.

Parameters:
sample - The value.
Returns:
The domain element of the supplied value, or null.

hasGaps

boolean hasGaps()
Tell us if there is a gap in this Domain1D which means a range where no DomainElement1D is defined.

Returns:
true in case a gap exists, false otherwise.


Copyright © 1996-2009 Geotools. All Rights Reserved.