public class TopLinkIdentityHashSet
extends java.util.AbstractCollection
implements java.util.Set, java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected oracle.toplink.essentials.internal.helper.TopLinkIdentityHashSet.Entry[] |
entries |
protected float |
loadFactor |
protected int |
threshold |
| Constructor and Description |
|---|
TopLinkIdentityHashSet()
Constructs a new TopLinkIdentityHashSet with a default initial
capacity of 32 and a loadfactor of 0.75.
|
TopLinkIdentityHashSet(java.util.Collection c)
Constructs a new TopLinkIdentityHashSet with the same contents
as the given Collection.
|
TopLinkIdentityHashSet(int initialCapacity)
Constructs a new TopLinkIdentityHashSet with the given
initial capacity and a default loadFactor of 0.75.
|
TopLinkIdentityHashSet(int initialCapacity,
float loadFactor)
Constructs a new TopLinkIdentityHashSet with the given initial
capacity and the given loadFactor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object obj)
Adds the given object to this TopLinkIdentityHashSet.
|
void |
clear()
Removes all of the objects from this TopLinkIdentityHashSet.
|
java.lang.Object |
clone()
Returns a shallow copy of this TopLinkIdentityHashSet (the
elements are not cloned).
|
boolean |
contains(java.lang.Object obj)
Returns true if this TopLinkIdentityHashSet contains
the given object.
|
boolean |
isEmpty() |
java.util.Iterator |
iterator()
Get an iterator for this TopLinkIdentityHashSet
|
boolean |
remove(java.lang.Object obj)
Removes the given object from this TopLinkIdentityHashSet, if
present.
|
boolean |
removeAll(java.util.Collection c)
This implementation throws an UnsupportedOperationException
because removeAll does not work correctly with reference
equality testing.
|
boolean |
retainAll(java.util.Collection c)
This implementation throws an UnsupportedOperationException.
|
int |
size() |
addAll, containsAll, toArray, toArray, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected transient oracle.toplink.essentials.internal.helper.TopLinkIdentityHashSet.Entry[] entries
protected transient int count
protected int threshold
protected float loadFactor
public TopLinkIdentityHashSet(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the
TopLinkIdentityHashSet.loadFactor - the loadFactor of the TopLinkIdentityHashSet.IllegalArgumentException - if the initial capacity is less
than zero, or if the loadFactor is nonpositive.public TopLinkIdentityHashSet(int initialCapacity)
initialCapacity - the initial capacity of the TopLinkIdentityHashSet.IllegalArgumentException - if the initial capacity is less
than zero.public TopLinkIdentityHashSet()
public TopLinkIdentityHashSet(java.util.Collection c)
c - the Collection whose contents are to be placed in the
new TopLinkIdentityHashSet.public int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.AbstractCollectionpublic boolean contains(java.lang.Object obj)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.AbstractCollectionobj - the object to find.public boolean add(java.lang.Object obj)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.AbstractCollectionobj - object to add.NullPointerException - if obj is null.public boolean remove(java.lang.Object obj)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.AbstractCollectionobj - the object to be removed from this TopLinkIdentityHashSet.public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.SetremoveAll in class java.util.AbstractCollectionpublic boolean retainAll(java.util.Collection c)
AbstractCollection indicates that retainAll
is an optional method.retainAll in interface java.util.CollectionretainAll in interface java.util.SetretainAll in class java.util.AbstractCollectionpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.AbstractCollectionpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollection