public interface ISetMemory<T> extends IMemory<T>
IMemory
that always contains values with a 0 or +1 multiplicity.
In case a write operation causes underflow or overflow, an IllegalStateException
is thrown.
Modifier and Type | Method and Description |
---|---|
default void |
forEachEntryWithMultiplicities(java.util.function.BiConsumer<T,java.lang.Integer> entryConsumer)
Process contained values with their multiplicities
|
default boolean |
removeOne(T value)
Removes one occurrence of the given value from the memory.
|
addOne, addSigned, clear, clearAllOf, removeOneOrNop
asMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, equals, fromMap, getCount, getCountUnsafe, hashCode, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafe
default void forEachEntryWithMultiplicities(java.util.function.BiConsumer<T,java.lang.Integer> entryConsumer)
IMemoryView
forEachEntryWithMultiplicities
in interface IMemoryView<T>
default boolean removeOne(T value)
IMemory
Precondition if IMultiset
or ISetMemory
: the value must have a positive amount of occurrences in the memory.