E
- public class Unique<E> extends gnu.trove.impl.hash.TObjectHash<E>
addOrGet(E)
is the key API, which
allows retrieving existing values.Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID
Serial version number.
|
_set, consumeFreeSlot, FREE, REMOVED
_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR
Constructor and Description |
---|
Unique()
Constructor with default size and load factors.
|
Unique(int initialCapacity)
Constructor with desired initial size.
|
Unique(int initialCapacity,
float loadFactor)
Constructor with desired initial size, and with the specified load factor.
|
Modifier and Type | Method and Description |
---|---|
E |
addOrGet(E obj)
Inserts a value into the set, unless it is already present.
|
void |
clear() |
protected void |
rehash(int newCapacity) |
boolean |
remove(Object obj)
Removes an existing object from the set.
|
buildObjectContractViolation, capacity, contains, dumpExtraInfo, equals, forEach, hash, index, insertionIndex, insertKey, objectInfo, readExternal, removeAt, reportPotentialConcurrentMod, setUp, throwObjectContractViolation, throwObjectContractViolation, writeExternal
calculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSize
static final long serialVersionUID
public Unique()
public Unique(int initialCapacity)
initialCapacity
- desired initial size.public Unique(int initialCapacity, float loadFactor)
initialCapacity
- desired initial sizeloadFactor
- load factorpublic E addOrGet(E obj)
obj
- Object to insert or retrievepublic boolean remove(Object obj)
obj
- Object to removepublic void clear()
clear
in class gnu.trove.impl.hash.THash
protected void rehash(int newCapacity)
rehash
in class gnu.trove.impl.hash.THash
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.