public class EclipseCollectionsSetMemory<Value> extends org.eclipse.collections.impl.set.mutable.UnifiedSet<Value> implements ISetMemory<Value>
Constructor and Description |
---|
EclipseCollectionsSetMemory() |
Modifier and Type | Method and Description |
---|---|
boolean |
addOne(Value value)
Adds one value occurrence to the memory.
|
boolean |
addSigned(Value value,
int count)
Adds the given number of occurrences to the memory.
|
void |
clearAllOf(Value value)
Removes all occurrences of the given value from the memory.
|
boolean |
containsNonZero(Value value) |
boolean |
containsNonZeroUnsafe(java.lang.Object value) |
java.util.Set<Value> |
distinctValues()
The set of distinct values
|
boolean |
equals(java.lang.Object obj) |
int |
getCount(Value value)
Returns the number of occurrences of the given value.
|
int |
getCountUnsafe(java.lang.Object value)
Returns the number of occurrences of the given value (which may be of any type).
|
int |
hashCode() |
boolean |
removeOne(Value value)
Removes one occurrence of the given value from the memory.
|
boolean |
removeOneOrNop(Value value)
Removes one occurrence of the given value from the memory, if possible.
|
Value |
theContainedVersionOf(Value value)
Where supported, returns the stored element that is equal to the given value, or null if none.
|
Value |
theContainedVersionOfUnsafe(java.lang.Object value)
Where supported, returns the stored element that is equal to the given value (of any type),
or null if none.
|
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, writeExternal
allocate, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asSynchronized, asUnmodifiable, cartesianProduct, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, 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, zipWithIndex
addAll, aggregateBy, aggregateInPlaceBy, countBy, countByWith, reduce, removeAll, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLong
appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, 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, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
finalize, getClass, notify, notifyAll, wait, wait, wait
forEachEntryWithMultiplicities
asMap, asStream, entriesWithMultiplicities, equals, fromMap, hashCode, isEmpty, size
aggregateBy, aggregateInPlaceBy, countBy, countByWith, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLong
appendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countBy, countByWith, countWith, detectIfNone, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectWith, getOnly, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
public int getCount(Value value)
IMemoryView
getCount
in interface IMemoryView<Value>
public int getCountUnsafe(java.lang.Object value)
IMemoryView
getCountUnsafe
in interface IMemoryView<Value>
public boolean containsNonZero(Value value)
containsNonZero
in interface IMemoryView<Value>
public boolean containsNonZeroUnsafe(java.lang.Object value)
containsNonZeroUnsafe
in interface IMemoryView<Value>
public boolean addOne(Value value)
IMemory
public boolean addSigned(Value value, int count)
IMemory
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.
public boolean removeOne(Value value)
IMemory
Precondition if IMultiset
or ISetMemory
: the value must have a positive amount of occurrences in the memory.
public boolean removeOneOrNop(Value value)
IMemory
Memory is unchanged and false is returned if
IMultiset
or ISetMemory
and value had no occurrences in the memory
removeOneOrNop
in interface IMemory<Value>
IDeltaBag
) is the first negative occurrence of the valuepublic void clearAllOf(Value value)
IMemory
clearAllOf
in interface IMemory<Value>
public java.util.Set<Value> distinctValues()
IMemoryView
distinctValues
in interface IMemoryView<Value>
public Value theContainedVersionOf(Value value)
IMemoryView
For collections that do not support canonicalization, simply returns the argument if contained, null if none.
theContainedVersionOf
in interface IMemoryView<Value>
public Value theContainedVersionOfUnsafe(java.lang.Object value)
IMemoryView
For collections that do not support canonicalization, simply returns the argument if contained, null if none.
theContainedVersionOfUnsafe
in interface IMemoryView<Value>
public int hashCode()
public boolean equals(java.lang.Object obj)