Interface IDeltaBag<T>
-
- All Superinterfaces:
Clearable
,IMemory<T>
,IMemoryView<T>
,java.lang.Iterable<T>
- All Known Implementing Classes:
EclipseCollectionsDeltaBag
public interface IDeltaBag<T> extends IMemory<T>
AnIMemory
that represents the difference between two states of a set orIMultiset
, and therefore may contain values with a negative multiplicity.- Since:
- 1.7
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
removeOneOrNop(T value)
Removes one occurrence of the given value from the memory, if possible.-
Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.util.IMemory
addOne, addSigned, clear, clearAllOf, removeOne
-
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
-
removeOneOrNop
default boolean removeOneOrNop(T value)
Description copied from interface:IMemory
Removes one occurrence of the given value from the memory, if possible.Memory is unchanged and false is returned if
IMultiset
orISetMemory
and value had no occurrences in the memory- Specified by:
removeOneOrNop
in interfaceIMemory<T>
- Returns:
- true if this was the the last occurrence of the value, or
(in case of
IDeltaBag
) is the first negative occurrence of the value
-
-