org.geotools.filter.function
Class RangedClassifier
java.lang.Object
org.geotools.filter.function.Classifier
org.geotools.filter.function.RangedClassifier
public final class RangedClassifier
- extends Classifier
Classifies into ranges of minimum and maximum values.
The buckets are defined such that:
min <= x < max
So 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 |
RangedClassifier(java.lang.Comparable[] min,
java.lang.Comparable[] max)
|
Method Summary |
int |
classify(java.lang.Object value)
Returns the slot this value belongs in. |
java.lang.Object |
getMax(int slot)
|
java.lang.Object |
getMin(int slot)
|
int |
getSize()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RangedClassifier
public RangedClassifier(java.lang.Comparable[] min,
java.lang.Comparable[] max)
getSize
public int getSize()
- Specified by:
getSize
in class Classifier
- Returns:
- the number of bins
getMin
public java.lang.Object getMin(int slot)
getMax
public java.lang.Object getMax(int slot)
classify
public int classify(java.lang.Object value)
- Description copied from class:
Classifier
- Returns the slot this value belongs in.
- Specified by:
classify
in class Classifier
- Returns:
- index, starting from zero
Copyright © 1996-2010 Geotools. All Rights Reserved.