Interface ISetMemory<T>
-
- All Superinterfaces:
Clearable,IMemory<T>,IMemoryView<T>,java.lang.Iterable<T>
- All Known Implementing Classes:
EclipseCollectionsLongSetMemory,EclipseCollectionsSetMemory
public interface ISetMemory<T> extends IMemory<T>
AnIMemorythat always contains values with a 0 or +1 multiplicity.In case a write operation causes underflow or overflow, an
IllegalStateExceptionis thrown.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidforEachEntryWithMultiplicities(java.util.function.BiConsumer<T,java.lang.Integer> entryConsumer)Process contained values with their multiplicitiesdefault booleanremoveOne(T value)Removes one occurrence of the given value from the memory.-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.util.IMemory
addOne, addSigned, clear, clearAllOf, removeOneOrNop
-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.util.IMemoryView
asMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, getCount, getCountUnsafe, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafe
-
-
-
-
Method Detail
-
forEachEntryWithMultiplicities
default void forEachEntryWithMultiplicities(java.util.function.BiConsumer<T,java.lang.Integer> entryConsumer)
Description copied from interface:IMemoryViewProcess contained values with their multiplicities- Specified by:
forEachEntryWithMultiplicitiesin interfaceIMemoryView<T>
-
removeOne
default boolean removeOne(T value)
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.
-
-