All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.roguewave.tools.v2-0.IdentitySet

java.lang.Object
   |
   +----com.roguewave.tools.v2-0.Set
           |
           +----com.roguewave.tools.v2-0.IdentitySet

public class IdentitySet
extends Set
implements Cloneable, Serializable

Constructor Index

 o IdentitySet()
Creates an empty set with default capacity.
 o IdentitySet(int)
Creates an empty set with a given initial capacity.

Method Index

 o clone()
Returns a clone of this IdentitySet.
 o contains(Object)
Returns true if the IdentitySet contains an element identical to the given item, false otherwise.
 o difference(IdentitySet, IdentitySet)
Returns a new IdentitySet containing the difference (A - B) of the two IdentitySets specified.
 o differenceWith(IdentitySet)
Modifies self to contain the difference of self with the given set (self = self - set)
 o find(Object)
Returns the element identical to the given item, or null if no such element is found.
 o insert(Object)
Adds a new item to the IdentitySet.
 o intersection(IdentitySet, IdentitySet)
Returns a new set containing the intersection of the two IdentitySet s specified.
 o intersectionWith(IdentitySet)
Modifies self to contain the intersection of self and the given set.
 o remove(Object)
Removes from the IdentitySet the element identical to the given item.
 o removeAll(Object)
Removes from the IdentitySet all elements identical to the given item.
 o symmetricDifference(IdentitySet, IdentitySet)
Returns a new set containing the symmetric difference between the two IdentitySets specified.

The symmetric difference between IdentitySet A and IdentitySet B is the difference (A - B) unioned with the difference (B - A).

 o symmetricDifferenceWith(IdentitySet)
Modifies self to contain the symmetric difference between self and the given set.

The symmetric difference between IdentitySet A and IdentitySet B is the difference (A - B) unioned with the difference (B - A).

 o union(IdentitySet, IdentitySet)
Returns a new set containing the union of the two IdentitySets specified.
 o unionWith(IdentitySet)
Modifies self to contain the union of self and the given set.

Constructors

 o IdentitySet
 public IdentitySet()
Creates an empty set with default capacity.

 o IdentitySet
 public IdentitySet(int n)
Creates an empty set with a given initial capacity.

Parameters:
n - The initial capacity of the underlying Hashtable

Methods

 o clone
 public synchronized Object clone()
Returns a clone of this IdentitySet. Note that the elements themselves are not cloned.

Overrides:
clone in class Set
 o contains
 public boolean contains(Object item)
Returns true if the IdentitySet contains an element identical to the given item, false otherwise.

Overrides:
contains in class Set
 o find
 public Object find(Object item)
Returns the element identical to the given item, or null if no such element is found.

Overrides:
find in class Set
 o insert
 public synchronized Object insert(Object item)
Adds a new item to the IdentitySet. The insertion fails if the IdentitySet already contains an element identical to item.

Returns:
As with the parent class, the new element if the insertion is successful, the existing element if it is not. Note that in both cases the method returns item!.
Overrides:
insert in class Set
 o remove
 public synchronized Object remove(Object item)
Removes from the IdentitySet the element identical to the given item. The method does nothing if no such element is found.

Returns:
The removed element, or null if no such element is found.
Overrides:
remove in class Set
 o removeAll
 public int removeAll(Object item)
Removes from the IdentitySet all elements identical to the given item. Note that since collections does not admit duplicate entries, the maximum number of elements removed will be 1.

Returns:
The number of elements removed
Overrides:
removeAll in class Set
 o intersection
 public static IdentitySet intersection(IdentitySet s1,
                                        IdentitySet s2)
Returns a new set containing the intersection of the two IdentitySet s specified.

 o intersectionWith
 public IdentitySet intersectionWith(IdentitySet set)
Modifies self to contain the intersection of self and the given set.

Returns:
self
 o difference
 public static IdentitySet difference(IdentitySet s1,
                                      IdentitySet s2)
Returns a new IdentitySet containing the difference (A - B) of the two IdentitySets specified.

 o differenceWith
 public IdentitySet differenceWith(IdentitySet set)
Modifies self to contain the difference of self with the given set (self = self - set)

Returns:
self
 o symmetricDifference
 public static IdentitySet symmetricDifference(IdentitySet s1,
                                               IdentitySet s2)
Returns a new set containing the symmetric difference between the two IdentitySets specified.

The symmetric difference between IdentitySet A and IdentitySet B is the difference (A - B) unioned with the difference (B - A).

 o symmetricDifferenceWith
 public IdentitySet symmetricDifferenceWith(IdentitySet set)
Modifies self to contain the symmetric difference between self and the given set.

The symmetric difference between IdentitySet A and IdentitySet B is the difference (A - B) unioned with the difference (B - A).

Returns:
self
 o union
 public static IdentitySet union(IdentitySet s1,
                                 IdentitySet s2)
Returns a new set containing the union of the two IdentitySets specified.

 o unionWith
 public IdentitySet unionWith(IdentitySet set)
Modifies self to contain the union of self and the given set.

Returns:
self

All Packages  Class Hierarchy  This Package  Previous  Next  Index