public final class SingletonMemoryView<Value> extends java.lang.Object implements IMemoryView<Value>
Constructor and Description |
---|
SingletonMemoryView(Value value) |
Modifier and Type | Method and Description |
---|---|
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 |
isEmpty() |
java.util.Iterator<Value> |
iterator() |
int |
size() |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asMap, asStream, entriesWithMultiplicities, equals, forEachEntryWithMultiplicities, fromMap, hashCode, theContainedVersionOf, theContainedVersionOfUnsafe
public SingletonMemoryView(Value value)
public java.util.Iterator<Value> iterator()
iterator
in interface java.lang.Iterable<Value>
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 int size()
size
in interface IMemoryView<Value>
public boolean isEmpty()
isEmpty
in interface IMemoryView<Value>
public java.util.Set<Value> distinctValues()
IMemoryView
distinctValues
in interface IMemoryView<Value>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object