public class EclipseCollectionsLongSetMemory extends org.eclipse.collections.impl.set.mutable.primitive.LongHashSet implements ISetMemory<java.lang.Long>
Modifier and Type | Class and Description |
---|---|
static class |
EclipseCollectionsLongSetMemory.SetWrapper
Helper that presents a primitive collection as a Set view
|
Constructor and Description |
---|
EclipseCollectionsLongSetMemory() |
Modifier and Type | Method and Description |
---|---|
boolean |
addOne(java.lang.Long value)
Adds one value occurrence to the memory.
|
boolean |
addSigned(java.lang.Long value,
int count)
Adds the given number of occurrences to the memory.
|
void |
clearAllOf(java.lang.Long value)
Removes all occurrences of the given value from the memory.
|
boolean |
containsNonZero(java.lang.Long value) |
boolean |
containsNonZeroUnsafe(java.lang.Object value) |
java.util.Set<java.lang.Long> |
distinctValues()
The set of distinct values
|
boolean |
equals(java.lang.Object obj) |
int |
getCount(java.lang.Long 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 |
isEmpty() |
java.util.Iterator<java.lang.Long> |
iterator() |
static java.util.Iterator<java.lang.Long> |
iteratorOf(org.eclipse.collections.api.LongIterable wrapped)
Helper for iterating a LongIterable
|
boolean |
removeOne(java.lang.Long value)
Removes one occurrence of the given value from the memory.
|
boolean |
removeOneOrNop(java.lang.Long value)
Removes one occurrence of the given value from the memory, if possible.
|
add, addAll, addAll, allSatisfy, anySatisfy, appendString, asSynchronized, asUnmodifiable, chunk, clear, collect, collect, compact, contains, count, detectIfNone, each, forEach, freeze, injectInto, longIterator, max, min, newEmpty, newSet, newSetWith, noneSatisfy, readExternal, reject, reject, remove, removeAll, removeAll, retainAll, retainAll, select, select, size, sum, toArray, toImmutable, with, withAll, without, withoutAll, writeExternal
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEachEntryWithMultiplicities
asMap, asStream, entriesWithMultiplicities, equals, fromMap, hashCode, size, theContainedVersionOf, theContainedVersionOfUnsafe
removeIf
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, flatCollect, maxIfEmpty, median, medianIfEmpty, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
public boolean addOne(java.lang.Long value)
IMemory
public boolean addSigned(java.lang.Long 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(java.lang.Long value)
IMemory
Precondition if IMultiset
or ISetMemory
: the value must have a positive amount of occurrences in the memory.
removeOne
in interface IMemory<java.lang.Long>
removeOne
in interface ISetMemory<java.lang.Long>
IDeltaBag
) is the first negative occurrence of the valuepublic boolean removeOneOrNop(java.lang.Long 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<java.lang.Long>
IDeltaBag
) is the first negative occurrence of the valuepublic void clearAllOf(java.lang.Long value)
IMemory
clearAllOf
in interface IMemory<java.lang.Long>
public int getCount(java.lang.Long value)
IMemoryView
getCount
in interface IMemoryView<java.lang.Long>
public int getCountUnsafe(java.lang.Object value)
IMemoryView
getCountUnsafe
in interface IMemoryView<java.lang.Long>
public boolean containsNonZero(java.lang.Long value)
containsNonZero
in interface IMemoryView<java.lang.Long>
public boolean containsNonZeroUnsafe(java.lang.Object value)
containsNonZeroUnsafe
in interface IMemoryView<java.lang.Long>
public java.util.Iterator<java.lang.Long> iterator()
iterator
in interface java.lang.Iterable<java.lang.Long>
public java.util.Set<java.lang.Long> distinctValues()
IMemoryView
distinctValues
in interface IMemoryView<java.lang.Long>
public boolean isEmpty()
isEmpty
in interface org.eclipse.collections.api.PrimitiveIterable
isEmpty
in interface IMemoryView<java.lang.Long>
public static java.util.Iterator<java.lang.Long> iteratorOf(org.eclipse.collections.api.LongIterable wrapped)
public int hashCode()
hashCode
in interface org.eclipse.collections.api.set.primitive.LongSet
hashCode
in class org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
public boolean equals(java.lang.Object obj)
equals
in interface org.eclipse.collections.api.set.primitive.LongSet
equals
in class org.eclipse.collections.impl.set.primitive.AbstractLongSet