Class EclipseCollectionsSetMemory<Value>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<Value>
org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection<Value>
org.eclipse.collections.impl.set.AbstractUnifiedSet<Value>
org.eclipse.collections.impl.set.mutable.UnifiedSet<Value>
tools.refinery.interpreter.matchers.util.EclipseCollectionsSetMemory<Value>
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Iterable<Value>,Collection<Value>,Set<Value>,org.eclipse.collections.api.collection.MutableCollection<Value>,org.eclipse.collections.api.InternalIterable<Value>,org.eclipse.collections.api.RichIterable<Value>,org.eclipse.collections.api.set.MutableSet<Value>,org.eclipse.collections.api.set.MutableSetIterable<Value>,org.eclipse.collections.api.set.Pool<Value>,org.eclipse.collections.api.set.SetIterable<Value>,org.eclipse.collections.api.set.UnsortedSetIterable<Value>,org.eclipse.collections.impl.parallel.BatchIterable<Value>,Clearable,IMemory<Value>,IMemoryView<Value>,ISetMemory<Value>
public class EclipseCollectionsSetMemory<Value>
extends org.eclipse.collections.impl.set.mutable.UnifiedSet<Value>
implements ISetMemory<Value>
- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.collections.impl.set.mutable.UnifiedSet
org.eclipse.collections.impl.set.mutable.UnifiedSet.PositionalIterator -
Field Summary
Fields inherited from class org.eclipse.collections.impl.set.mutable.UnifiedSet
NULL_KEY, occupied, tableFields inherited from class org.eclipse.collections.impl.set.AbstractUnifiedSet
DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, loadFactor, maxSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds one value occurrence to the memory.booleanAdds the given number of occurrences to the memory.voidclearAllOf(Value value) Removes all occurrences of the given value from the memory.booleancontainsNonZero(Value 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()booleanRemoves one occurrence of the given value from the memory.booleanremoveOneOrNop(Value value) Removes one occurrence of the given value from the memory, if possible.theContainedVersionOf(Value value) Where supported, returns the stored element that is equal to the given value, or null if none.Where supported, returns the stored element that is equal to the given value (of any type), or null if none.Methods inherited from class org.eclipse.collections.impl.set.mutable.UnifiedSet
add, addAllIterable, allocateTable, asParallel, batchForEach, clear, clone, contains, copySet, detect, detectOptional, each, each, forEachWith, forEachWithIndex, get, getFirst, getLast, getTable, groupBy, groupByEach, index, iterator, newEmpty, newEmpty, newSet, newSet, newSet, newSet, newSetWith, partition, partitionWith, put, readExternal, rehash, reject, rejectWith, remove, removeFromPool, retainAllIterable, select, selectAndRejectWith, selectInstancesOf, selectWith, shortCircuit, shortCircuitWith, size, tap, toArray, toArray, toImmutable, trimToSize, with, with, with, with, withAll, without, withoutAll, writeExternalMethods inherited from class org.eclipse.collections.impl.set.AbstractUnifiedSet
allocate, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asSynchronized, asUnmodifiable, cartesianProduct, chunk, collect, collectIf, collectWith, computeMaxSize, detect, detectOptional, difference, differenceInto, flatCollect, getBatchCount, groupByUniqueKey, init, injectIntoWith, intersect, intersectInto, isProperSubsetOf, isSubsetOf, noneSatisfy, noneSatisfyWith, powerSet, rehash, removeAllIterable, retainAll, shortCircuit, symmetricDifference, symmetricDifferenceInto, union, unionInto, zip, zipWithIndexMethods inherited from class org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection
addAll, countBy, countByEach, countByWith, reduce, removeAll, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, asLazy, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.collections.impl.parallel.BatchIterable
forEachMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface tools.refinery.interpreter.matchers.util.IMemoryView
asMap, asStream, entriesWithMultiplicities, isEmpty, sizeMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEachMethods inherited from interface tools.refinery.interpreter.matchers.util.ISetMemory
forEachEntryWithMultiplicitiesMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
aggregateBy, aggregateInPlaceBy, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, countBy, countByEach, countByWith, flatCollectWith, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface org.eclipse.collections.api.set.MutableSet
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, toImmutableSetMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, appendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detectIfNone, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, notEmpty, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexMethods inherited from interface java.util.Set
addAll, containsAll, isEmpty, removeAll, spliterator
-
Constructor Details
-
EclipseCollectionsSetMemory
public EclipseCollectionsSetMemory()
-
-
Method Details
-
getCount
Description copied from interface:IMemoryViewReturns the number of occurrences of the given value.- Specified by:
getCountin interfaceIMemoryView<Value>- 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<Value>- Returns:
- the number of occurrences
-
containsNonZero
- Specified by:
containsNonZeroin interfaceIMemoryView<Value>- Returns:
- true if the given value is contained with a nonzero multiplicity
-
containsNonZeroUnsafe
- Specified by:
containsNonZeroUnsafein interfaceIMemoryView<Value>- Returns:
- true if the given value (which may be of any type) is contained with a nonzero multiplicity
-
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<Value>- 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
-
clearAllOf
Description copied from interface:IMemoryRemoves all occurrences of the given value from the memory.- Specified by:
clearAllOfin interfaceIMemory<Value>
-
distinctValues
Description copied from interface:IMemoryViewThe set of distinct values- Specified by:
distinctValuesin interfaceIMemoryView<Value>
-
theContainedVersionOf
Description copied from interface:IMemoryViewWhere supported, returns the stored element that is equal to the given value, or null if none. Useful for canonicalization in case of non-identity equals().For collections that do not support canonicalization, simply returns the argument if contained, null if none.
- Specified by:
theContainedVersionOfin interfaceIMemoryView<Value>- Returns:
- a value equal to the argument if such a value is stored, or null if none
-
theContainedVersionOfUnsafe
Description copied from interface:IMemoryViewWhere supported, returns the stored element that is equal to the given value (of any type), or null if none. Useful for canonicalization in case of non-identity equals().For collections that do not support canonicalization, simply returns the argument if contained, null if none.
- Specified by:
theContainedVersionOfUnsafein interfaceIMemoryView<Value>- Returns:
- a value equal to the argument if such a value is stored, or null if none
-
hashCode
public int hashCode() -
equals
-