public final class UnlimitedLong2DoubleAccumulator extends java.lang.Object implements Long2DoubleAccumulator
Scored item accumulator with no upper bound.
Constructor and Description |
---|
UnlimitedLong2DoubleAccumulator() |
Modifier and Type | Method and Description |
---|---|
LongList |
finishList()
Accumulate the scored items into a list.
|
Long2DoubleMap |
finishMap()
Accumulate the scores into a map and reset the accumulator.
|
LongSet |
finishSet()
Accumulate the scored items into a set.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
putAll
public boolean isEmpty()
Long2DoubleAccumulator
Query whether the accumulator is empty.
isEmpty
in interface Long2DoubleAccumulator
true
if the accumulator has no items.public int size()
Long2DoubleAccumulator
Get the number of items in the accumulator.
size
in interface Long2DoubleAccumulator
public void put(long item, double score)
Long2DoubleAccumulator
Put a new item in the accumulator. Putting the same item twice does not replace the previous entry - it adds a new entry with the same ID.
put
in interface Long2DoubleAccumulator
item
- The item to add to the accumulator.score
- The item’s score.public Long2DoubleMap finishMap()
Long2DoubleAccumulator
Accumulate the scores into a map and reset the accumulator.
After this method is called, the accumulator is ready for another accumulation.
finishMap
in interface Long2DoubleAccumulator
public LongSet finishSet()
Long2DoubleAccumulator
Accumulate the scored items into a set.
finishSet
in interface Long2DoubleAccumulator
public LongList finishList()
Long2DoubleAccumulator
Accumulate the scored items into a list.
finishList
in interface Long2DoubleAccumulator