Interface IMultiset<T>
-
- All Superinterfaces:
Clearable,IMemory<T>,IMemoryView<T>,java.lang.Iterable<T>
- All Known Implementing Classes:
EclipseCollectionsLongMultiset,EclipseCollectionsMultiset
public interface IMultiset<T> extends IMemory<T>
AnIMemorythat always contains values with a nonnegative multiplicity.In case a write operation caused underflow, an
IllegalStateExceptionis thrown.- Since:
- 1.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddPositive(T value, int count)Adds the given number of occurrences to the memory.-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.util.IMemory
addOne, addSigned, clear, clearAllOf, removeOne, removeOneOrNop
-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.util.IMemoryView
asMap, asStream, containsNonZero, containsNonZeroUnsafe, distinctValues, entriesWithMultiplicities, forEachEntryWithMultiplicities, getCount, getCountUnsafe, isEmpty, size, theContainedVersionOf, theContainedVersionOfUnsafe
-
-
-
-
Method Detail
-
addPositive
boolean addPositive(T value, int count)
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
-
-