Interface IMultiset<T>
- All Superinterfaces:
Clearable,IMemory<T>,IMemoryView<T>,Iterable<T>
- All Known Implementing Classes:
EclipseCollectionsLongMultiset,EclipseCollectionsMultiset
An
IMemory that always contains values with a nonnegative multiplicity.
In case a write operation caused underflow, an IllegalStateException is thrown.
- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPositive(T value, int count) Adds the given number of occurrences to the memory.Methods inherited from interface tools.refinery.interpreter.matchers.util.IMemory
addOne, addSigned, clear, clearAllOf, removeOne, removeOneOrNopMethods inherited from interface tools.refinery.interpreter.matchers.util.IMemoryView
asMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, forEachEntryWithMultiplicities, getCount, getCountUnsafe, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafeMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
addPositive
Adds the given number of occurrences to the memory. The count value must be a positive number.- Parameters:
count- the number of occurrences- Returns:
- true if the tuple was not present before in the memory
-