public class EclipseCollectionsMultiset<T> extends EclipseCollectionsBagMemory<T> implements IMultiset<T>
| Constructor and Description |
|---|
EclipseCollectionsMultiset() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addOne(T value)
Adds one value occurrence to the memory.
|
boolean |
addPositive(T value,
int count)
Adds the given number of occurrences to the memory.
|
boolean |
addSigned(T value,
int count)
Adds the given number of occurrences to the memory.
|
boolean |
removeOne(T value)
Removes one occurrence of the given value from the memory.
|
protected boolean |
removeOneInternal(T value,
boolean throwIfImpossible) |
boolean |
removeOneOrNop(T value)
Removes one occurrence of the given value from the memory, if possible.
|
clearAllOf, containsNonZero, containsNonZeroUnsafe, distinctValues, equals, forEachEntryWithMultiplicities, getCount, getCountUnsafe, hashCode, iterator, toStringaddToValue, allocateTable, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, asSynchronized, asUnmodifiable, average, chunk, clear, collect, compact, contains, containsAll, containsAll, containsKey, containsValue, count, detectIfNone, each, flipUniqueValues, forEach, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getOrThrow, injectInto, intIterator, isEmpty, keySet, keysView, keyValuesView, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, newMap, newWithKeysValues, newWithKeysValues, newWithKeysValues, newWithKeysValues, noneSatisfy, notEmpty, put, putAll, readExternal, reject, reject, remove, removeKey, removeKeyIfAbsent, select, select, size, sum, toArray, toBag, toImmutable, toList, toSet, toSortedArray, toSortedList, updateValue, updateValues, values, withKeysValues, withKeysValues, withKeysValues, withKeyValue, withoutAllKeys, withoutKey, writeExternalclone, finalize, getClass, notify, notifyAll, wait, wait, waitclear, clearAllOfasMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, equals, forEachEntryWithMultiplicities, fromMap, getCount, getCountUnsafe, hashCode, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafepublic boolean addOne(T value)
IMemorypublic boolean addPositive(T value, int count)
IMultisetaddPositive in interface IMultiset<T>count - the number of occurrencespublic boolean addSigned(T value, int count)
IMemory Precondition if IMultiset: at least the given amount of occurrences exist, if count is negative.
Precondition if ISetMemory: count is +1 or -1, the latter is only allowed if the set contains the value.
public boolean removeOne(T value)
IMemory Precondition if IMultiset or ISetMemory: the value must have a positive amount of occurrences in the memory.
public boolean removeOneOrNop(T value)
IMemory Memory is unchanged and false is returned if
IMultiset or ISetMemory and value had no occurrences in the memory
removeOneOrNop in interface IMemory<T>IDeltaBag) is the first negative occurrence of the valueprotected boolean removeOneInternal(T value, boolean throwIfImpossible)