public interface ScoredItemAccumulator
| Modifier and Type | Method and Description |
|---|---|
List<ScoredId> |
finish()
Accumulate the scores into a sorted scored list and reset the
accumulator.
|
LongSet |
finishSet()
Accumulate the scored items into a set.
|
MutableSparseVector |
finishVector()
Accumulate the scores into a mutable sparse vector and
reset the accumulator.
|
boolean |
isEmpty()
Query whether the accumulator is empty.
|
void |
put(long item,
double score)
Put a new item in the accumulator.
|
int |
size()
Get the number of items in the accumulator.
|
boolean isEmpty()
true if the accumulator has no items.int size()
void put(long item,
double score)
item - The item to add to the accumulator.score - The item's score.List<ScoredId> finish()
After this method is called, the accumulator is ready for another accumulation.
MutableSparseVector finishVector()
After this method is called, the accumulator is ready for another accumulation.
LongSet finishSet()