public static interface IMultiLookupAbstract.ToMultisetsAbstract<Key,Value> extends IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
Not intended as an API, but rather as a 'base class' for implementors. Realized as an interface with default implementations, instead of an abstract class, to ensure that implementors can easily choose a base class such as UnifiedMap to augment.
Implementor should inherit from a Map
IMultiLookupAbstract.ToMultisetsAbstract<Key,Value>, IMultiLookupAbstract.ToSetsAbstract<Key,Value>
IMultiLookup.ChangeGranularity
Modifier and Type | Method and Description |
---|---|
default boolean |
addToBucket(MarkedMemory.MarkedMultiset<Value> bucket,
Value value,
boolean throwIfImpossible)
Increases the multiplicity of the value in the bucket.
|
default Value |
asSingleton(MarkedMemory.MarkedMultiset<Value> bucket)
Checks whether the bucket is a singleton, i.e.
|
default MarkedMemory.MarkedMultiset<Value> |
createDeltaBucket(Value positive,
Value negative) |
MarkedMemory.MarkedMultiset<Value> |
createMarkedMultiset() |
default MarkedMemory.MarkedMultiset<Value> |
createSingletonBucket(Value value) |
default boolean |
duplicatesAllowed() |
default boolean |
negativesAllowed() |
default boolean |
removeFromBucket(MarkedMemory.MarkedMultiset<Value> bucket,
Value value,
boolean throwIfImpossible)
Decreases the multiplicity of the value in the bucket.
|
addPair, addPairInternal, addPairOrNop, addPairPositiveMultiplicity, countKeys, distinctKeys, distinctKeysStream, distinctValues, distinctValuesStream, handleSingleton, lookup, lookupAndRemoveAll, lookupExists, lookupUnsafe, lowLevelGet, lowLevelGetUnsafe, lowLevelKeySet, lowLevelPut, lowLevelPutIfAbsent, lowLevelRemove, lowLevelSize, lowLevelValues, removePair, removePairInternal, removePairOrNop, yieldSingleton
clear, equals, hashCode, isEmpty, lookupOrEmpty, lookupUnsafeOrEmpty
MarkedMemory.MarkedMultiset<Value> createMarkedMultiset()
default boolean negativesAllowed()
negativesAllowed
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
default boolean duplicatesAllowed()
duplicatesAllowed
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
default boolean addToBucket(MarkedMemory.MarkedMultiset<Value> bucket, Value value, boolean throwIfImpossible)
IMultiLookupAbstract
addToBucket
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
default boolean removeFromBucket(MarkedMemory.MarkedMultiset<Value> bucket, Value value, boolean throwIfImpossible)
IMultiLookupAbstract
removeFromBucket
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
default Value asSingleton(MarkedMemory.MarkedMultiset<Value> bucket)
IMultiLookupAbstract
asSingleton
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
default MarkedMemory.MarkedMultiset<Value> createSingletonBucket(Value value)
createSingletonBucket
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
default MarkedMemory.MarkedMultiset<Value> createDeltaBucket(Value positive, Value negative)
createDeltaBucket
in interface IMultiLookupAbstract<Key,Value,MarkedMemory.MarkedMultiset<Value>>
positive
- the previously existing value, or null if the delta is to contain a single negative tuple