public class TCustomHashSet<E> extends TCustomObjectHash<E> implements Set <E>, Iterable <E>, Externalizable
strategy_set, consumeFreeSlot, FREE, REMOVED_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR| Constructor and Description |
|---|
TCustomHashSet()
FOR EXTERNALIZATION ONLY!!!
|
TCustomHashSet(HashingStrategy
Creates a new
THashSet instance with the default capacity and load factor.
|
TCustomHashSet(HashingStrategy
Creates a new
THashSet instance containing the elements of
collection.
|
TCustomHashSet(HashingStrategy
Creates a new
THashSet instance with a prime capacity equal to or greater than
initialCapacity and with the default load factor.
|
TCustomHashSet(HashingStrategy
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.
|
boolean |
addAll(Collection
Adds all of the elements in
collection to the set.
|
void |
clear()
Empties the set.
|
boolean |
containsAll(Collection
Tests the set to determine if all of the elements in
collection are present.
|
boolean |
equals(Object
|
int |
hashCode()
|
TObjectHashIterator |
iterator()
Creates an iterator over the values of the set.
|
void |
readExternal(ObjectInput
|
protected void |
rehash(int newCapacity)
Expands the set to accommodate new values.
|
boolean |
remove(Object
Removes
obj from the set.
|
boolean |
removeAll(Collection
Removes all of the elements in
collection from the set.
|
boolean |
retainAll(Collection
Removes any values in the set which are not contained in
collection.
|
Object |
toArray()
Returns a new array containing the objects in the set.
|
<T> T[] |
toArray(T[] a)
Returns a typed array of the objects in the set.
|
String |
toString()
|
void |
writeExternal(ObjectOutput
|
equals, hashbuildObjectContractViolation, capacity, contains, dumpExtraInfo, forEach, index, insertionIndex, insertKey, objectInfo, removeAt, reportPotentialConcurrentMod, setUp, 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 TCustomHashSet()
public TCustomHashSet(HashingStrategy<? super E> strategy)
THashSet instance with the default capacity and load factor.
public TCustomHashSet(HashingStrategy<? super E> strategy, 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 TCustomHashSet(HashingStrategy<? super E> strategy, 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 TCustomHashSet(HashingStrategy<? super E> strategy, Collection <? extends E> collection)
THashSet instance containing the elements of
collection.
collection - a
Collection value
public boolean add(E obj)
public boolean equals(Objectother)
public int hashCode()
protected void rehash(int newCapacity)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public void clear()
public boolean remove(Objectobj)
public TObjectHashIterator<E> iterator()
public boolean containsAll(Collection<?> collection)
containsAll in interface
Collection<E>
containsAll in interface
Set<E>
collection - a
Collection value
public boolean addAll(Collection<? extends E> collection)
public boolean removeAll(Collection<?> collection)
public boolean retainAll(Collection<?> collection)
public StringtoString()
public void writeExternal(ObjectOutputout) throws IOException
writeExternal in interface
Externalizable
writeExternal in class
TCustomObjectHash<E>
IOException
public void readExternal(ObjectInputin) throws IOException , ClassNotFoundException
readExternal in interface
Externalizable
readExternal in class
TCustomObjectHash<E>
IOException
ClassNotFoundException