public class TLinkedHashSet<E> extends THashSet<E>
Constructor and Description |
---|
TLinkedHashSet()
Creates a new
THashSet instance with the default
capacity and load factor. |
TLinkedHashSet(java.util.Collection<? extends E> es)
Creates a new
THashSet instance containing the
elements of collection. |
TLinkedHashSet(int initialCapacity)
Creates a new
THashSet instance with a prime
capacity equal to or greater than initialCapacity and
with the default load factor. |
TLinkedHashSet(int initialCapacity,
float loadFactor)
Creates a new
THashSet instance with a prime
capacity equal to or greater than initialCapacity and
with the specified load factor. |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E obj)
Inserts a value into the set.
|
void |
clear()
Empties the set.
|
boolean |
forEach(TObjectProcedure<? super E> procedure)
Executes procedure for each element in the set.
|
TObjectHashIterator<E> |
iterator()
Creates an iterator over the values of the set.
|
protected void |
rehash(int newCapacity)
Expands the set to accommodate new values.
|
protected void |
removeAt(int index)
Delete the record at index.
|
int |
setUp(int initialCapacity)
initializes the Object set of this hash table.
|
java.lang.String |
toString() |
protected void |
writeEntries(java.io.ObjectOutput out) |
addAll, containsAll, equals, hashCode, readExternal, remove, removeAll, retainAll, toArray, toArray, writeExternal
buildObjectContractViolation, capacity, contains, dumpExtraInfo, equals, hash, index, insertionIndex, insertKey, objectInfo, reportPotentialConcurrentMod, throwObjectContractViolation, throwObjectContractViolation
calculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSize
public TLinkedHashSet()
THashSet
instance with the default
capacity and load factor.public TLinkedHashSet(int initialCapacity)
THashSet
instance with a prime
capacity equal to or greater than initialCapacity and
with the default load factor.initialCapacity
- an int
valuepublic TLinkedHashSet(int initialCapacity, float loadFactor)
THashSet
instance with a prime
capacity equal to or greater than initialCapacity and
with the specified load factor.initialCapacity
- an int
valueloadFactor
- a float
valuepublic TLinkedHashSet(java.util.Collection<? extends E> es)
THashSet
instance containing the
elements of collection.es
- a Collection
valuepublic int setUp(int initialCapacity)
setUp
in class gnu.trove.impl.hash.TObjectHash<E>
initialCapacity
- an int
valueint
valuepublic void clear()
public boolean add(E obj)
protected void removeAt(int index)
gnu.trove.impl.hash.THash
removeAt
in class gnu.trove.impl.hash.TObjectHash<E>
index
- an int
valueprotected void rehash(int newCapacity)
protected void writeEntries(java.io.ObjectOutput out) throws java.io.IOException
writeEntries
in class THashSet<E>
java.io.IOException
public TObjectHashIterator<E> iterator()
public boolean forEach(TObjectProcedure<? super E> procedure)
forEach
in class gnu.trove.impl.hash.TObjectHash<E>
procedure
- a TObjectProcedure
value