C
- the class of instances that represent the classification categoriespublic class ParametricSimpleGetClassifier<C> extends java.lang.Object implements Classifier<Parametric,C>
Classification
from the given object parameter.Constructor and Description |
---|
ParametricSimpleGetClassifier(java.lang.Class<? extends C> categoriesClass,
java.lang.String parameterName)
Creates a new simple classifier that retrieves an existing
Classification
from the given object parameter. |
Modifier and Type | Method and Description |
---|---|
Classification<C> |
classify(Parametric object,
Parametric parameters)
Classifies the given
object into zero, one, or several categories C . |
java.lang.Class<? extends C> |
getCategoriesClass()
Returns the class of instances that represent the classification categories (classes).
|
public ParametricSimpleGetClassifier(java.lang.Class<? extends C> categoriesClass, java.lang.String parameterName) throws java.lang.NullPointerException
Classification
from the given object parameter.categoriesClass
- the class of instances that represent the classification categoriesparameterName
- the name of the Parametric
parameter that contains the classification categoriesjava.lang.NullPointerException
- if either categoriesClass or parameterName is nullpublic Classification<C> classify(Parametric object, Parametric parameters) throws ClassificationException
Classifier
object
into zero, one, or several categories C
.classify
in interface Classifier<Parametric,C>
object
- the object to classifyparameters
- additional parameters for the classification;
the values for the parameters are specific to a given classifier
implementation and can be updated during the process if they are ModifiableParametric
ClassificationException
- if there was an error classifying the objectpublic java.lang.Class<? extends C> getCategoriesClass()
Classifier
getCategoriesClass
in interface Classifier<Parametric,C>