public abstract class Classifier<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Classifier<T> |
myNext |
Modifier | Constructor and Description |
---|---|
protected |
Classifier(Classifier<T> next,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addElement(T t,
ProcessingContext context) |
abstract java.lang.Iterable<T> |
classify(java.lang.Iterable<? extends T> source,
ProcessingContext context) |
Classifier<T> |
getNext() |
java.lang.String |
getPresentableName() |
abstract java.util.List<Pair<T,java.lang.Object>> |
getSortingWeights(java.lang.Iterable<? extends T> items,
ProcessingContext context) |
void |
removeElement(T element,
ProcessingContext context) |
protected final Classifier<T> myNext
protected Classifier(Classifier<T> next, java.lang.String name)
public void addElement(T t, ProcessingContext context)
public abstract java.lang.Iterable<T> classify(java.lang.Iterable<? extends T> source, ProcessingContext context)
public abstract java.util.List<Pair<T,java.lang.Object>> getSortingWeights(java.lang.Iterable<? extends T> items, ProcessingContext context)
classify(Iterable, ProcessingContext)
.
May return an empty list if there are no suitable objects available.
Used for diagnostics and statistic collection.public final Classifier<T> getNext()
public void removeElement(T element, ProcessingContext context)
public final java.lang.String getPresentableName()