org.deegree.coverage.rangeset
Class Interval<T extends Comparable<T>,R extends Comparable<R>>
java.lang.Object
org.deegree.coverage.rangeset.Interval<T,R>
- Type Parameters:
T
- of the values in this intervalR
- 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 $
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.
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 Intervalmin
- 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.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org]]>