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 void
forEachEntryWithMultiplicities
(BiConsumer<T, Integer> entryConsumer) Process contained values with their multiplicitiesdefault boolean
Removes one occurrence of the given value from the memory.Methods inherited from interface tools.refinery.interpreter.matchers.util.IMemory
addOne, addSigned, clear, clearAllOf, removeOneOrNop
Methods inherited from interface tools.refinery.interpreter.matchers.util.IMemoryView
asMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, getCount, getCountUnsafe, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafe
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
forEachEntryWithMultiplicities
Description copied from interface:IMemoryView
Process contained values with their multiplicities- Specified by:
forEachEntryWithMultiplicities
in interfaceIMemoryView<T>
-
removeOne
Description copied from interface:IMemory
Removes one occurrence of the given value from the memory.Precondition if
IMultiset
orISetMemory
: the value must have a positive amount of occurrences in the memory.
-