|
||||||||
| 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(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.Collectionclear in interface java.util.SetCollection.clear()public int size()
size in interface java.util.Collectionsize in interface java.util.SetCollection.size()public boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetCollection.isEmpty()public boolean add(java.lang.Object key)
add in interface java.util.Collectionadd in interface java.util.SetCollection.add(java.lang.Object)public boolean contains(java.lang.Object key)
contains in interface java.util.Collectioncontains in interface java.util.SetCollection.contains(java.lang.Object)public boolean remove(java.lang.Object key)
remove in interface java.util.Collectionremove in interface java.util.SetCollection.remove(java.lang.Object)public java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.SetCollection.iterator()public java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.SetCollection.toArray()public java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.SetCollection.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.CollectioncontainsAll in interface java.util.SetSet.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.CollectionaddAll in interface java.util.SetSet.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.CollectionremoveAll in interface java.util.SetSet.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.CollectionretainAll in interface java.util.SetSet.retainAll(java.util.Collection>)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||