public abstract class EclipseCollectionsBagMemory<T> extends org.eclipse.collections.impl.map.mutable.primitive.ObjectIntHashMap<T> implements IMemory<T>
Inherits Eclipse Collections' Object-to-Int primitive hashmap and counts the number of occurrences of each value. Element is deleted if # of occurences drops to 0.
Constructor and Description |
---|
EclipseCollectionsBagMemory() |
Modifier and Type | Method and Description |
---|---|
void |
clearAllOf(T value)
Removes all occurrences of the given value from the memory.
|
boolean |
containsNonZero(T value) |
int |
getCount(T value)
Returns the number of occurrences of the given value.
|
java.util.Iterator<T> |
iterator() |
java.lang.String |
toString() |
addToValue, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, asSynchronized, asUnmodifiable, average, clear, collect, compact, contains, containsAll, containsAll, containsKey, containsValue, count, detectIfNone, each, equals, forEach, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getOrThrow, hashCode, injectInto, intIterator, isEmpty, keySet, keysView, keyValuesView, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, newMap, newWithKeysValues, newWithKeysValues, newWithKeysValues, newWithKeysValues, noneSatisfy, notEmpty, put, putAll, readExternal, reject, reject, remove, removeKey, removeKeyIfAbsent, select, select, size, sum, toArray, toBag, toImmutable, toList, toSet, toSortedArray, toSortedList, updateValue, values, withKeysValues, withKeysValues, withKeysValues, withKeyValue, withoutAllKeys, withoutKey, writeExternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public int getCount(T value)
IMemory
public boolean containsNonZero(T value)
containsNonZero
in interface IMemory<T>
public void clearAllOf(T value)
IMemory
clearAllOf
in interface IMemory<T>
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public java.lang.String toString()