|
GNU Trove | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgnu.trove.impl.hash.THash
gnu.trove.impl.hash.TObjectHash<E>
gnu.trove.set.hash.THashSet<E>
gnu.trove.set.hash.TLinkedHashSet<E>
public class TLinkedHashSet<E>
Created by IntelliJ IDEA. User: Johan Date: 15/03/11 Time: 18:15 To change this template use File | Settings | File Templates.
| Field Summary |
|---|
| Fields inherited from class gnu.trove.impl.hash.TObjectHash |
|---|
_set, consumeFreeSlot, FREE, REMOVED |
| Fields inherited from class gnu.trove.impl.hash.THash |
|---|
_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class gnu.trove.set.hash.THashSet |
|---|
addAll, containsAll, equals, hashCode, readExternal, remove, removeAll, retainAll, toArray, toArray, writeExternal |
| Methods inherited from class gnu.trove.impl.hash.TObjectHash |
|---|
buildObjectContractViolation, capacity, contains, dumpExtraInfo, equals, hash, index, insertionIndex, insertKey, objectInfo, reportPotentialConcurrentMod, throwObjectContractViolation, throwObjectContractViolation |
| Methods inherited from class gnu.trove.impl.hash.THash |
|---|
calculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
contains, isEmpty, size |
| Constructor Detail |
|---|
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 value
public 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 value| Method Detail |
|---|
public int setUp(int initialCapacity)
setUp in class gnu.trove.impl.hash.TObjectHash<E>initialCapacity - an int value
int valuepublic void clear()
clear in interface java.util.Collection<E>clear in interface java.util.Set<E>clear in class THashSet<E>public java.lang.String toString()
toString in class THashSet<E>public boolean add(E obj)
add in interface java.util.Collection<E>add in interface java.util.Set<E>add in class THashSet<E>obj - an Object value
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)
rehash in class THashSet<E>newCapacity - an int value
protected void writeEntries(java.io.ObjectOutput out)
throws java.io.IOException
writeEntries in class THashSet<E>java.io.IOExceptionpublic TObjectHashIterator<E> iterator()
iterator in interface java.lang.Iterable<E>iterator in interface java.util.Collection<E>iterator in interface java.util.Set<E>iterator in class THashSet<E>Iterator valuepublic boolean forEach(TObjectProcedure<? super E> procedure)
forEach in class gnu.trove.impl.hash.TObjectHash<E>procedure - a TObjectProcedure value
|
GNU Trove | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||