Class EclipseCollectionsLongSetMemory
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractLongIterable
org.eclipse.collections.impl.set.primitive.AbstractLongSet
org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
tools.refinery.interpreter.matchers.util.EclipseCollectionsLongSetMemory
- All Implemented Interfaces:
Externalizable,Serializable,Iterable<Long>,org.eclipse.collections.api.collection.primitive.MutableLongCollection,org.eclipse.collections.api.LongIterable,org.eclipse.collections.api.PrimitiveIterable,org.eclipse.collections.api.set.primitive.LongSet,org.eclipse.collections.api.set.primitive.MutableLongSet,Clearable,IMemory<Long>,IMemoryView<Long>,ISetMemory<Long>
public class EclipseCollectionsLongSetMemory
extends org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
implements ISetMemory<Long>
- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHelper that presents a primitive collection as a Set view -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds one value occurrence to the memory.booleanAdds the given number of occurrences to the memory.voidclearAllOf(Long value) Removes all occurrences of the given value from the memory.booleancontainsNonZero(Long value) booleancontainsNonZeroUnsafe(Object value) The set of distinct valuesbooleanintReturns the number of occurrences of the given value.intgetCountUnsafe(Object value) Returns the number of occurrences of the given value (which may be of any type).inthashCode()booleanisEmpty()iterator()iteratorOf(org.eclipse.collections.api.LongIterable wrapped) Helper for iterating a LongIterablebooleanRemoves one occurrence of the given value from the memory.booleanremoveOneOrNop(Long value) Removes one occurrence of the given value from the memory, if possible.Methods inherited from class org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
add, addAll, addAll, allocateTable, allSatisfy, anySatisfy, appendString, asSynchronized, asUnmodifiable, boxed, chunk, clear, collect, collect, compact, contains, count, detectIfNone, each, freeze, injectInto, longIterator, max, min, newEmpty, newSet, newSetWith, readExternal, reject, reject, remove, removeAll, removeAll, retainAll, retainAll, select, select, size, sum, toArray, toArray, toImmutable, trimToSize, with, withAll, without, withoutAll, writeExternalMethods inherited from class org.eclipse.collections.impl.set.primitive.AbstractLongSet
cartesianProductMethods inherited from class org.eclipse.collections.impl.primitive.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.interpreter.matchers.util.IMemoryView
asMap, asStream, entriesWithMultiplicities, size, theContainedVersionOf, theContainedVersionOfUnsafeMethods inherited from interface tools.refinery.interpreter.matchers.util.ISetMemory
forEachEntryWithMultiplicitiesMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.eclipse.collections.api.LongIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.set.primitive.LongSet
cartesianProduct, isProperSubsetOf, isSubsetOf, tapMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
removeIfMethods inherited from interface org.eclipse.collections.api.set.primitive.MutableLongSet
difference, intersect, symmetricDifference, tap, unionMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
EclipseCollectionsLongSetMemory
public EclipseCollectionsLongSetMemory()
-
-
Method Details
-
addOne
Description copied from interface:IMemoryAdds one value occurrence to the memory. -
addSigned
Description copied from interface:IMemoryAdds the given number of occurrences to the memory. The count value may or may not be negative.Precondition if
IMultiset: at least the given amount of occurrences exist, if count is negative.Precondition if
ISetMemory: count is +1 or -1, the latter is only allowed if the set contains the value. -
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. -
removeOneOrNop
Description copied from interface:IMemoryRemoves one occurrence of the given value from the memory, if possible.Memory is unchanged and false is returned if
IMultisetorISetMemoryand value had no occurrences in the memory- Specified by:
removeOneOrNopin interfaceIMemory<Long>- 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 - Since:
- 2.3
-
clearAllOf
Description copied from interface:IMemoryRemoves all occurrences of the given value from the memory.- Specified by:
clearAllOfin interfaceIMemory<Long>
-
getCount
Description copied from interface:IMemoryViewReturns the number of occurrences of the given value.- Specified by:
getCountin interfaceIMemoryView<Long>- Returns:
- the number of occurrences
-
getCountUnsafe
Description copied from interface:IMemoryViewReturns the number of occurrences of the given value (which may be of any type).- Specified by:
getCountUnsafein interfaceIMemoryView<Long>- Returns:
- the number of occurrences
-
containsNonZero
- Specified by:
containsNonZeroin interfaceIMemoryView<Long>- Returns:
- true if the given value is contained with a nonzero multiplicity
-
containsNonZeroUnsafe
- Specified by:
containsNonZeroUnsafein interfaceIMemoryView<Long>- Returns:
- true if the given value (which may be of any type) is contained with a nonzero multiplicity
-
iterator
-
distinctValues
Description copied from interface:IMemoryViewThe set of distinct values- Specified by:
distinctValuesin interfaceIMemoryView<Long>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceIMemoryView<Long>- Specified by:
isEmptyin interfaceorg.eclipse.collections.api.PrimitiveIterable- Returns:
- iff contains at least one value with non-zero occurrences
-
iteratorOf
Helper for iterating a LongIterable -
hashCode
public int hashCode()- Specified by:
hashCodein interfaceorg.eclipse.collections.api.set.primitive.LongSet- Overrides:
hashCodein classorg.eclipse.collections.impl.set.mutable.primitive.LongHashSet
-
equals
- Specified by:
equalsin interfaceorg.eclipse.collections.api.set.primitive.LongSet- Overrides:
equalsin classorg.eclipse.collections.impl.set.primitive.AbstractLongSet
-