public class TopLinkIdentityHashSet extends AbstractCollection implements Set, Cloneable, 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(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(Object obj)
Adds the given object to this TopLinkIdentityHashSet.
|
void |
clear()
Removes all of the objects from this TopLinkIdentityHashSet.
|
Object |
clone()
Returns a shallow copy of this TopLinkIdentityHashSet (the
elements are not cloned).
|
boolean |
contains(Object obj)
Returns true if this TopLinkIdentityHashSet contains
the given object.
|
boolean |
isEmpty() |
Iterator |
iterator()
Get an iterator for this TopLinkIdentityHashSet
|
boolean |
remove(Object obj)
Removes the given object from this TopLinkIdentityHashSet, if
present.
|
boolean |
removeAll(Collection c)
This implementation throws an UnsupportedOperationException
because removeAll does not work correctly with reference
equality testing.
|
boolean |
retainAll(Collection c)
This implementation throws an UnsupportedOperationException.
|
int |
size() |
addAll, containsAll, toArray, toArray, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, spliterator, toArray, toArrayparallelStream, removeIf, streamprotected 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(Collection c)
c - the Collection whose contents are to be placed in the
new TopLinkIdentityHashSet.public int size()
size in interface Collectionsize in interface Setsize in class AbstractCollectionpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface SetisEmpty in class AbstractCollectionpublic boolean contains(Object obj)
contains in interface Collectioncontains in interface Setcontains in class AbstractCollectionobj - the object to find.public boolean add(Object obj)
add in interface Collectionadd in interface Setadd in class AbstractCollectionobj - object to add.NullPointerException - if obj is null.public boolean remove(Object obj)
remove in interface Collectionremove in interface Setremove in class AbstractCollectionobj - the object to be removed from this TopLinkIdentityHashSet.public boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface SetremoveAll in class AbstractCollectionpublic boolean retainAll(Collection c)
AbstractCollection indicates that retainAll
is an optional method.retainAll in interface CollectionretainAll in interface SetretainAll in class AbstractCollectionpublic void clear()
clear in interface Collectionclear in interface Setclear in class AbstractCollectionpublic Object clone()
public Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Setiterator in class AbstractCollectionCopyright © 2023. All rights reserved.