Package org.geotools.filter.function
Class RangedClassifier
- Object
-
- Classifier
-
- RangedClassifier
-
public final class RangedClassifier extends Classifier
Classifies into ranges of minimum and maximum values.The buckets are defined such that:
min <= x < maxSo if you provide the following min/max values:
min = {3, 6, 9}
max = {4, 10, 30}
The classify function will classify items based on:
3 <= x < 4
6 <= x < 10
9 <= x <= 30- Author:
- Cory Horner, Refractions Research
-
-
Constructor Summary
Constructors Constructor Description RangedClassifier(Comparable[] min, Comparable[] max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
classify(Object value)
Returns the slot this value belongs in.Object
getMax(int slot)
Object
getMin(int slot)
int
getSize()
-
Methods inherited from class Classifier
classify, getPercentages, getTitle, getTitles, setPercentages, setTitle, setTitles
-
-
-
-
Constructor Detail
-
RangedClassifier
public RangedClassifier(Comparable[] min, Comparable[] max)
-
-
Method Detail
-
getSize
public int getSize()
- Specified by:
getSize
in classClassifier
- Returns:
- the number of bins
-
getMin
public Object getMin(int slot)
-
getMax
public Object getMax(int slot)
-
classify
public int classify(Object value)
Description copied from class:Classifier
Returns the slot this value belongs in.- Specified by:
classify
in classClassifier
- Returns:
- index, starting from zero
-
-