Interface ISetMemory<T>
- All Superinterfaces:
Clearable,IMemory<T>,IMemoryView<T>,Iterable<T>
- All Known Implementing Classes:
EclipseCollectionsLongSetMemory,EclipseCollectionsSetMemory
An
IMemory that always contains values with a 0 or +1 multiplicity.
In case a write operation causes underflow or overflow, an IllegalStateException is thrown.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidforEachEntryWithMultiplicities(BiConsumer<T, Integer> entryConsumer) Process contained values with their multiplicitiesdefault booleanRemoves one occurrence of the given value from the memory.Methods inherited from interface tools.refinery.interpreter.matchers.util.IMemory
addOne, addSigned, clear, clearAllOf, removeOneOrNopMethods inherited from interface tools.refinery.interpreter.matchers.util.IMemoryView
asMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, getCount, getCountUnsafe, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafeMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
forEachEntryWithMultiplicities
Description copied from interface:IMemoryViewProcess contained values with their multiplicities- Specified by:
forEachEntryWithMultiplicitiesin interfaceIMemoryView<T>
-
removeOne
Description copied from interface:IMemoryRemoves one occurrence of the given value from the memory.Precondition if
IMultisetorISetMemory: the value must have a positive amount of occurrences in the memory.
-