org.castor.util
Class IdentitySet
java.lang.Object
org.castor.util.IdentitySet
- Set
public final class IdentitySet
extends java.lang.Object
implements Set
An IdentitySet that uses reference-equality instead of object-equality. According
to its special function it violates some design contracts of the Set
interface.
$Revision: 6907 $ $Date: 2006-04-13 10:49:49 -0600 (Thu, 13 Apr 2006) $
IdentitySet() - Construct a set with default capacity.
|
IdentitySet(int capacity) - Construct a set with given capacity.
|
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) -
|
IdentitySet
public IdentitySet()
Construct a set with default capacity.
IdentitySet
public IdentitySet(int capacity)
Construct a set with given capacity.
capacity
- The capacity of entries this set should be initialized with.
add
public boolean add(Object key)
java.util.Collection.add(java.lang.Object)
addAll
public boolean addAll(Collection c)
This optional method has not been implemented for IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
clear
public void clear()
java.util.Collection.clear()
contains
public boolean contains(Object key)
java.util.Collection.contains(java.lang.Object)
containsAll
public boolean containsAll(Collection c)
In contrast with the design contract of the Set
interface this method
has not been implemented and throws a UnsupportedOperationException
.
java.util.Set.containsAll
isEmpty
public boolean isEmpty()
java.util.Collection.isEmpty()
iterator
public Iterator iterator()
java.util.Collection.iterator()
remove
public boolean remove(Object key)
java.util.Collection.remove(java.lang.Object)
removeAll
public boolean removeAll(Collection c)
This optional method has not been implemented for IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
retainAll
public boolean retainAll(Collection c)
This optional method has not been implemented for IdentitySet
instead
it throws a UnsupportedOperationException
as defined in the
Set
interface.
size
public int size()
java.util.Collection.size()
toArray
public Object[] toArray()
java.util.Collection.toArray()
toArray
public Object[] toArray(Object[] a)
java.util.Collection.toArray(java.lang.Object[])
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com