| Modifier and Type | Class and Description |
|---|---|
| private static class | IdentityHashSet.Entry
IdentityHashSet entry. |
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| protected transient int | |
| pack-priv static final int | |
| pack-priv static final float | |
| private transient IdentityHashSet. | |
| protected float | |
| pack-priv static final int | |
| pack-priv static final long | |
| protected int |
| Access | Constructor and Description |
|---|---|
| public | IdentityHashSet(int
the initial capacity of the
initialCapacity, float IdentityHashSet.the loadFactor of the loadFactor)IdentityHashSet.Constructs a new |
| public | IdentityHashSet(int
the initial capacity of the IdentityHashSet. initialCapacity)Constructs a new |
| public | IdentityHashSet()
Constructs a new |
| public | IdentityHashSet(Collection<E>
the c)Collection whose contents are to be placed in the
new IdentityHashSet.Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this IdentityHashSet did not
already contain obj.object to add. obj)Overrides java. Implements java. IdentityHashSet.
|
| public void | clear()
Overrides java. Implements java. IdentityHashSet.
|
| public Object | Returns: a shallow copy of thisIdentityHashSet.Overrides java. IdentityHashSet (the
elements are not cloned).
|
| public boolean | Returns: true if thisIdentityHashSet contains
obj by reference.the object to find. obj)Overrides java. Implements java. true if this IdentityHashSet contains
the given object.
|
| public boolean | Returns: true if this IdentityHashSet is empty.Overrides java. Implements java. true if this set contains no elements.
|
| public Iterator | iterator()
Implements abstract java. Implements java. IdentityHashSet
|
| private void | |
| private void | |
| public boolean | Returns: true if this IdentityHashSet contained
obj.the object to be removed from this obj)IdentityHashSet.Overrides java. Implements java. IdentityHashSet, if
present.
|
| public boolean | removeAll(Collection<E>
collection containing elements to be removed from this set c)Overrides java. Implements java. UnsupportedOperationException
because removeAll does not work correctly with reference
equality testing.
|
| public boolean | retainAll(Collection<E>
collection containing elements to be retained in this set c)Overrides java. Implements java. UnsupportedOperationException.
|
| public int | Returns: the size of thisIdentityHashSet.Implements abstract java. Implements java. |
| private void |
| count | back to summary |
|---|---|
| protected transient int count | |
| DEFAULT_INITIAL_CAPACITY | back to summary |
|---|---|
| pack-priv static final int DEFAULT_INITIAL_CAPACITY | |
| DEFAULT_LOAD_FACTOR | back to summary |
|---|---|
| pack-priv static final float DEFAULT_LOAD_FACTOR | |
| entries | back to summary |
|---|---|
| private transient IdentityHashSet. | |
| loadFactor | back to summary |
|---|---|
| protected float loadFactor | |
| MAXIMUM_CAPACITY | back to summary |
|---|---|
| pack-priv static final int MAXIMUM_CAPACITY | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| threshold | back to summary |
|---|---|
| protected int threshold | |
| IdentityHashSet | back to summary |
|---|---|
| public IdentityHashSet(int initialCapacity, float loadFactor) Constructs a new
| |
| IdentityHashSet | back to summary |
|---|---|
| public IdentityHashSet(int initialCapacity) Constructs a new
| |
| IdentityHashSet | back to summary |
|---|---|
| public IdentityHashSet() Constructs a new | |
| IdentityHashSet | back to summary |
|---|---|
| public IdentityHashSet(Collection<E> c) Constructs a new
| |
| add | back to summary |
|---|---|
| public boolean add(Object obj) Overrides java. Implements java. Adds the given object to this
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Removes all of the objects from this
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Returns a shallow copy of this | |
| contains | back to summary |
|---|---|
| public boolean contains(Object obj) Overrides java. Implements java. Returns | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides java. Implements java. Doc from java. Returns
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Get an iterator for this
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException Deserialize the | |
| rehash | back to summary |
|---|---|
| private void rehash() INTERNAL: Re-builds the internal array of Entry's with a larger capacity. This method is called automatically when the number of objects in this IdentityHashSet exceeds its current threshold. | |
| remove | back to summary |
|---|---|
| public boolean remove(Object obj) Overrides java. Implements java. Removes the given object from this | |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(Collection<E> c) Overrides java. Implements java. This implementation throws an
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(Collection<E> c) Overrides java. Implements java. This implementation throws an
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream s) throws IOException, ClassNotFoundException Serialize the state of this
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv IdentityHashSet. | |
| pack-priv Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected Object |
| hash | back to summary |
|---|---|
| pack-priv int hash | |
| next | back to summary |
|---|---|
| pack-priv IdentityHashSet. | |
| value | back to summary |
|---|---|
| pack-priv Object value | |
| Entry | back to summary |
|---|---|
| pack-priv Entry(int hash, Object value, IdentityHashSet. | |
| clone | back to summary |
|---|---|
| protected Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv IdentityHashSet. | |
| pack-priv IdentityHashSet. | |
| pack-priv int | |
| pack-priv IdentityHashSet. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Object | |
| public void | remove()
Overrides default java. |
| copyOfEntries | back to summary |
|---|---|
| pack-priv IdentityHashSet. | |
| entry | back to summary |
|---|---|
| pack-priv IdentityHashSet. | |
| index | back to summary |
|---|---|
| pack-priv int index | |
| lastReturned | back to summary |
|---|---|
| pack-priv IdentityHashSet. | |
| IdentityHashSetIterator | back to summary |
|---|---|
| pack-priv IdentityHashSetIterator() | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the iteration. | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
| |