|
||||||||||
| 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 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>)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||