java.lang.Iterable
, java.util.Collection
, java.util.Set
public final class IdentitySet
extends java.lang.Object
implements java.util.Set
Set
interface.Modifier and Type | Class | Description |
---|---|---|
class |
IdentitySet.Entry |
An entry of the
IdentitySet . |
Constructor | Description |
---|---|
IdentitySet() |
Construct a set with default capacity.
|
IdentitySet(int capacity) |
Construct a set with given capacity.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(java.lang.Object key) |
|
boolean |
addAll(java.util.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(java.lang.Object key) |
|
boolean |
containsAll(java.util.Collection c) |
In contrast with the design contract of the
Set interface this method
has not been implemented and throws a UnsupportedOperationException . |
boolean |
isEmpty() |
|
java.util.Iterator |
iterator() |
|
boolean |
remove(java.lang.Object key) |
|
boolean |
removeAll(java.util.Collection c) |
This optional method has not been implemented for
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface. |
boolean |
retainAll(java.util.Collection c) |
This optional method has not been implemented for
IdentitySet instead
it throws a UnsupportedOperationException as defined in the
Set interface. |
int |
size() |
|
java.lang.Object[] |
toArray() |
|
java.lang.Object[] |
toArray(java.lang.Object[] a) |
public IdentitySet()
public IdentitySet(int capacity)
capacity
- The capacity of entries this set should be initialized with.public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.Set
Collection.clear()
public int size()
size
in interface java.util.Collection
size
in interface java.util.Set
Collection.size()
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
Collection.isEmpty()
public boolean add(java.lang.Object key)
add
in interface java.util.Collection
add
in interface java.util.Set
Collection.add(java.lang.Object)
public boolean contains(java.lang.Object key)
contains
in interface java.util.Collection
contains
in interface java.util.Set
Collection.contains(java.lang.Object)
public boolean remove(java.lang.Object key)
remove
in interface java.util.Collection
remove
in interface java.util.Set
Collection.remove(java.lang.Object)
public java.util.Iterator iterator()
iterator
in interface java.util.Collection
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Set
Collection.iterator()
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
Collection.toArray()
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
Collection.toArray(java.lang.Object[])
public boolean containsAll(java.util.Collection c)
Set
interface this method
has not been implemented and throws a UnsupportedOperationException
.
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
Set.containsAll(java.util.Collection<?>)
public boolean addAll(java.util.Collection c)
IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
Set.addAll(java.util.Collection<? extends E>)
public boolean removeAll(java.util.Collection c)
IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
Set.removeAll(java.util.Collection<?>)
public boolean retainAll(java.util.Collection c)
IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
Set.retainAll(java.util.Collection<?>)
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com