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