public class TLinkedHashSet<E> extends THashSet<E>
_set, consumeFreeSlot, FREE, REMOVED_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR| Constructor and Description |
|---|
TLinkedHashSet()
Creates a new
THashSet instance with the default capacity and load factor.
|
TLinkedHashSet(Collection
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
Executes
procedure for each element in the set.
|
TObjectHashIterator |
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.
|
String |
toString()
|
protected void |
writeEntries(ObjectOutput
|
addAll, containsAll, equals, hashCode, readExternal, remove, removeAll, retainAll, toArray, toArray, writeExternalbuildObjectContractViolation, capacity, contains, dumpExtraInfo, equals, hash, index, insertionIndex, insertKey, objectInfo, reportPotentialConcurrentMod, throwObjectContractViolation, throwObjectContractViolationcalculateGrownCapacity, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontains, isEmpty, size, spliteratorparallelStream, removeIf, streampublic 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 value
loadFactor - a
float value
public TLinkedHashSet(Collection<? extends E> es)
THashSet instance containing the elements of
collection.
es - a
Collection value
public int setUp(int initialCapacity)
setUp in class
TObjectHash<E>
initialCapacity - an
int value
int value
public void clear()
public StringtoString()
public boolean add(E obj)
protected void removeAt(int index)
THash
removeAt in class
TObjectHash<E>
index - an
int value
protected void rehash(int newCapacity)
protected void writeEntries(ObjectOutputout) throws IOException
writeEntries in class
THashSet<E>
IOException
public TObjectHashIterator<E> iterator()
public boolean forEach(TObjectProcedure<? super E> procedure)
forEach in class
TObjectHash<E>
procedure - a
TObjectProcedure value