public final class IdentitySet extends Object implements Set
Set
interface.| Modifier and Type | Class and Description |
|---|---|
class |
IdentitySet.Entry
An entry of the
IdentitySet. |
| Constructor and Description |
|---|
IdentitySet()
Construct a set with default capacity.
|
IdentitySet(int capacity)
Construct a set with given capacity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object key) |
boolean |
addAll(Collection c)
This optional method has not been implemented for
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface. |
void |
clear() |
boolean |
contains(Object key) |
boolean |
containsAll(Collection c)
In contrast with the design contract of the
Set interface this method
has not been implemented and throws a UnsupportedOperationException. |
boolean |
isEmpty() |
Iterator |
iterator() |
boolean |
remove(Object key) |
boolean |
removeAll(Collection c)
This optional method has not been implemented for
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface. |
boolean |
retainAll(Collection c)
This optional method has not been implemented for
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface. |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, spliteratorparallelStream, removeIf, streampublic IdentitySet()
public IdentitySet(int capacity)
capacity - The capacity of entries this set should be initialized with.public void clear()
clear in interface Collectionclear in interface SetCollection.clear()public int size()
size in interface Collectionsize in interface SetCollection.size()public boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface SetCollection.isEmpty()public boolean add(Object key)
add in interface Collectionadd in interface SetCollection.add(java.lang.Object)public boolean contains(Object key)
contains in interface Collectioncontains in interface SetCollection.contains(java.lang.Object)public boolean remove(Object key)
remove in interface Collectionremove in interface SetCollection.remove(java.lang.Object)public Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface SetCollection.iterator()public Object[] toArray()
toArray in interface CollectiontoArray in interface SetCollection.toArray()public Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface SetCollection.toArray(java.lang.Object[])public boolean containsAll(Collection c)
Set interface this method
has not been implemented and throws a UnsupportedOperationException.
containsAll in interface CollectioncontainsAll in interface SetSet.containsAll(java.util.Collection<?>)public boolean addAll(Collection c)
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface.
addAll in interface CollectionaddAll in interface SetSet.addAll(java.util.Collection<? extends E>)public boolean removeAll(Collection c)
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface.
removeAll in interface CollectionremoveAll in interface SetSet.removeAll(java.util.Collection<?>)public boolean retainAll(Collection c)
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface.
retainAll in interface CollectionretainAll in interface SetSet.retainAll(java.util.Collection<?>)Copyright © 2021. All rights reserved.