public interface Store
Bin, which are pairs of
indices and counters.| Modifier and Type | Method and Description |
|---|---|
default void |
add(Bin bin)
Updates the counter at the specified index.
|
default void |
add(int index)
Increments the counter at the specified index.
|
void |
add(int index,
double count)
Updates the counter at the specified index.
|
default void |
add(int index,
long count)
Updates the counter at the specified index.
|
void |
clear()
Zeros all counts in the store.
|
Store |
copy() |
default void |
forEach(BinAcceptor acceptor)
Supplies each bin to the acceptor
|
java.util.Iterator<Bin> |
getAscendingIterator() |
default java.util.stream.Stream<Bin> |
getAscendingStream() |
java.util.Iterator<Bin> |
getDescendingIterator() |
default java.util.stream.Stream<Bin> |
getDescendingStream() |
default int |
getMaxIndex() |
default int |
getMinIndex() |
default java.util.stream.Stream<Bin> |
getStream() |
default double |
getTotalCount() |
default boolean |
isEmpty() |
default void |
mergeWith(Store store)
Merges another store into this one.
|
default void |
serialize(Serializer serializer) |
default int |
serializedSize() |
default void add(int index)
index - the index of the counter to be incrementeddefault void add(int index,
long count)
index - the index of the counter to be updatedcount - a non-negative integer valuejava.lang.IllegalArgumentException - if count is negativevoid add(int index,
double count)
index - the index of the counter to be updatedcount - a non-negative valuejava.lang.IllegalArgumentException - if count is negativedefault void add(Bin bin)
bin - the bin to be used for updating the counterdefault void mergeWith(Store store)
add operations that have
been run on the other store on this one.store - the store to be merged into this oneStore copy()
void clear()
default boolean isEmpty()
true iff the Store does not contain any non-zero counterdefault double getTotalCount()
default int getMinIndex()
java.util.NoSuchElementException - if the store is emptydefault int getMaxIndex()
java.util.NoSuchElementException - if the store is emptydefault void forEach(BinAcceptor acceptor)
acceptor - consumes this store's binsdefault java.util.stream.Stream<Bin> getStream()
default java.util.stream.Stream<Bin> getAscendingStream()
default java.util.stream.Stream<Bin> getDescendingStream()
java.util.Iterator<Bin> getAscendingIterator()
java.util.Iterator<Bin> getDescendingIterator()
default int serializedSize()
default void serialize(Serializer serializer)