deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.coverage.rangeset
Class Interval<T extends Comparable<T>,R extends Comparable<R>>

java.lang.Object
  extended by org.deegree.coverage.rangeset.Interval<T,R>
Type Parameters:
T - of the values in this interval
R - type of the Resolution

public class Interval<T extends Comparable<T>,R extends Comparable<R>>
extends Object

The Interval an intervall.

Version:
$Revision: 19041 $, $Date: 2009-08-11 17:04:57 +0200 (Di, 11 Aug 2009) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Nested Class Summary
static class Interval.Closure
          The Closure of an interval
 
Constructor Summary
Interval(SingleValue<T> min, SingleValue<T> max, Interval.Closure closure, String semantic, boolean atomic, SingleValue<R> spacing)
           
 
Method Summary
static
<RS extends Comparable<RS>>
Interval<?,RS>
createFromStrings(String type, String min, String max, Interval.Closure closure, String semantic, boolean atomic, SingleValue<RS> resolution)
           
 Interval.Closure getClosure()
           
 SingleValue<T> getMax()
           
 SingleValue<T> getMin()
           
 String getSemantic()
           
 SingleValue<R> getSpacing()
           
 boolean isAtomic()
           
 boolean isInBounds(Interval<?,?> inter)
           
 boolean liesWithin(T value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Interval

public Interval(SingleValue<T> min,
                SingleValue<T> max,
                Interval.Closure closure,
                String semantic,
                boolean atomic,
                SingleValue<R> spacing)
         throws IllegalArgumentException
Parameters:
min -
max -
closure -
semantic -
atomic -
spacing - may be null
Throws:
IllegalArgumentException - if the types of the min and max are not equal.
Method Detail

getMin

public final SingleValue<T> getMin()
Returns:
the min

getMax

public final SingleValue<T> getMax()
Returns:
the max

getClosure

public final Interval.Closure getClosure()
Returns:
the closure

getSemantic

public final String getSemantic()
Returns:
the semantic

isAtomic

public final boolean isAtomic()
Returns:
the atomic is true if only interval end are supported.

getSpacing

public final SingleValue<R> getSpacing()
Returns:
the spacing

isInBounds

public boolean isInBounds(Interval<?,?> inter)
Parameters:
inter - to check against
Returns:
true if this interval is in the bounds of the given interval.

createFromStrings

public static <RS extends Comparable<RS>> Interval<?,RS> createFromStrings(String type,
                                                                           String min,
                                                                           String max,
                                                                           Interval.Closure closure,
                                                                           String semantic,
                                                                           boolean atomic,
                                                                           SingleValue<RS> resolution)
Type Parameters:
RS - type of the resolution.
Parameters:
type - of the Interval
min - will be the min value, not null.
max - will be the max value, not null..
closure - of the interval, if null defaults to Interval.Closure.closed
semantic - describing the interval, may be null
atomic -
resolution - of the steps, may be null.
Returns:
the Interval instantiated with the given min, max and optional resolution

toString

public String toString()
Overrides:
toString in class Object

liesWithin

public boolean liesWithin(T value)
Parameters:
value -
Returns:
true if the given value lies within the bounds of this interval.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>