org.geotools.filter.function
Class Classifier

Object
  extended by Classifier
Direct Known Subclasses:
ExplicitClassifier, RangedClassifier

public abstract class Classifier
extends Object

The data structure returned by classification functions. We can take this object, tweak it, and then pass it to a ClassifyFunction.

Author:
Cory Horner, Refractions Research

Constructor Summary
Classifier()
           
 
Method Summary
 int classify(Expression expr, Object feature)
          Returns the slot containing the passed expression's value.
abstract  int classify(Object value)
          Returns the slot this value belongs in.
abstract  int getSize()
           
 String getTitle(int slot)
           
 String[] getTitles()
           
 void setTitle(int slot, String title)
           
 void setTitles(String[] titles)
           
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Classifier

public Classifier()
Method Detail

getTitles

public String[] getTitles()

setTitles

public void setTitles(String[] titles)

setTitle

public void setTitle(int slot,
                     String title)

getTitle

public String getTitle(int slot)

classify

public int classify(Expression expr,
                    Object feature)
Returns the slot containing the passed expression's value.


classify

public abstract int classify(Object value)
Returns the slot this value belongs in.

Parameters:
value -
Returns:
index, starting from zero

getSize

public abstract int getSize()
Returns:
the number of bins

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2014 Geotools. All Rights Reserved.