public class EclipseCollectionsLongSetMemory extends java.lang.Object 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 |
clear()
Empties out 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.
|
int |
size() |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEachEntryWithMultiplicities
asMap, entriesWithMultiplicities, equals, fromMap, hashCode, theContainedVersionOf, theContainedVersionOfUnsafe
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.
public void clearAllOf(java.lang.Long value)
IMemory
clearAllOf
in interface IMemory<java.lang.Long>
public void clear()
IMemory
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 int size()
size
in interface IMemoryView<java.lang.Long>
public boolean isEmpty()
isEmpty
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 java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Iterator<java.lang.Long> iteratorOf(org.eclipse.collections.api.LongIterable wrapped)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object