Package org.geotools.coverage.io.util
Class NumberRangeComparator
- Object
-
- NumberRangeComparator
-
- All Implemented Interfaces:
Comparator<Range<? extends Number>>
public class NumberRangeComparator extends Object implements Comparator<Range<? extends Number>>
A NumberRange comparator
-
-
Constructor Summary
Constructors Constructor Description NumberRangeComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Range<? extends Number> firstRange, Range<? extends Number> secondRange)
static int
doubleCompare(double firstRangeMin, double firstRangeMax, double secondRangeMin, double secondRangeMax)
Given a set of 4 double representing the extrema of 2 ranges, compare the 2 ranges.-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Range<? extends Number> firstRange, Range<? extends Number> secondRange)
- Specified by:
compare
in interfaceComparator<Range<? extends Number>>
-
doubleCompare
public static int doubleCompare(double firstRangeMin, double firstRangeMax, double secondRangeMin, double secondRangeMax)
Given a set of 4 double representing the extrema of 2 ranges, compare the 2 ranges.- Parameters:
firstRangeMin
- the min value of the first rangefirstRangeMax
- the max value of the first rangesecondRangeMin
- the min value of the second rangesecondRangeMax
- the max value of the second range- Returns:
- TODO: Improve that logic to deal with special cases on intervals management
-
-