|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.core.util.IdentitySet
public final class IdentitySet
An IdentitySet that uses reference-equality instead of object-equality. According
to its special function it violates some design contracts of the Set
interface.
Nested Class Summary | |
---|---|
class |
IdentitySet.Entry
An entry of the IdentitySet . |
Constructor Summary | |
---|---|
IdentitySet()
Construct a set with default capacity. |
|
IdentitySet(int capacity)
Construct a set with given capacity. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
equals, hashCode |
Constructor Detail |
---|
public IdentitySet()
public IdentitySet(int capacity)
capacity
- The capacity of entries this set should be initialized with.Method Detail |
---|
public void clear()
clear
in interface Collection
clear
in interface Set
Collection.clear()
public int size()
size
in interface Collection
size
in interface Set
Collection.size()
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
Collection.isEmpty()
public boolean add(Object key)
add
in interface Collection
add
in interface Set
Collection.add(java.lang.Object)
public boolean contains(Object key)
contains
in interface Collection
contains
in interface Set
Collection.contains(java.lang.Object)
public boolean remove(Object key)
remove
in interface Collection
remove
in interface Set
Collection.remove(java.lang.Object)
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
Collection.iterator()
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
Collection.toArray()
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface Set
Collection.toArray(java.lang.Object[])
public boolean containsAll(Collection c)
Set
interface this method
has not been implemented and throws a UnsupportedOperationException
.
containsAll
in interface Collection
containsAll
in interface Set
Set.containsAll(java.util.Collection>)
public boolean addAll(Collection c)
IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
addAll
in interface Collection
addAll
in interface Set
Set.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 Collection
removeAll
in interface Set
Set.removeAll(java.util.Collection>)
public boolean retainAll(Collection c)
IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
retainAll
in interface Collection
retainAll
in interface Set
Set.retainAll(java.util.Collection>)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |