public class LiftShorterItemsClassifier extends Classifier<LookupElement>
Modifier and Type | Class and Description |
---|---|
static class |
LiftShorterItemsClassifier.LiftingCondition |
myNext
Constructor and Description |
---|
LiftShorterItemsClassifier(java.lang.String name,
Classifier<LookupElement> next,
LiftShorterItemsClassifier.LiftingCondition condition,
boolean liftBefore) |
Modifier and Type | Method and Description |
---|---|
void |
addElement(LookupElement added,
ProcessingContext context) |
java.lang.Iterable<LookupElement> |
classify(java.lang.Iterable<? extends LookupElement> source,
ProcessingContext context) |
java.util.List<Pair<LookupElement,java.lang.Object>> |
getSortingWeights(java.lang.Iterable<? extends LookupElement> items,
ProcessingContext context) |
void |
removeElement(LookupElement element,
ProcessingContext context) |
getNext, getPresentableName
public LiftShorterItemsClassifier(java.lang.String name, Classifier<LookupElement> next, LiftShorterItemsClassifier.LiftingCondition condition, boolean liftBefore)
public void addElement(LookupElement added, ProcessingContext context)
addElement
in class Classifier<LookupElement>
public java.lang.Iterable<LookupElement> classify(java.lang.Iterable<? extends LookupElement> source, ProcessingContext context)
classify
in class Classifier<LookupElement>
public java.util.List<Pair<LookupElement,java.lang.Object>> getSortingWeights(java.lang.Iterable<? extends LookupElement> items, ProcessingContext context)
getSortingWeights
in class Classifier<LookupElement>
Classifier.classify(Iterable, ProcessingContext)
.
May return an empty list if there are no suitable objects available.
Used for diagnostics and statistic collection.public void removeElement(LookupElement element, ProcessingContext context)
removeElement
in class Classifier<LookupElement>