|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.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(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)
|
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 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.lang.Iterable
iterator
in interface java.util.Collection
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
java.util.MSet#containsAll()
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
java.util.Set#addAll()
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
java.util.Set#removeAll()
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
java.util.Set#retainAll()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |