|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A collection that contains no duplicate elements. As implied by its name, this class models the mathematical set abstraction.
| Method Summary | |
Relation |
cartesianProduct(Set y)
Constructs the cartesian product (X x Y) of two sets X and Y. |
Set |
difference(Set t)
Returns the difference of a given set with this set. |
Relation |
identity()
Constructs a relation mapping each value in this set onto itself. |
Set |
intersection(Set t)
Returns the intersection of this set with a given set. |
boolean |
isSubsetOf(Set t)
Determines whether a given set contains at least the elements in this set. |
boolean |
isSupersetOf(Set t)
Determines whether this set contains at least the elements in a given set. |
Set |
union(Set t)
Constructs the union of a given set with this set. |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
public Set union(Set t)
S.union(T) are those objects which are members of
S or T or both.
t - the set to union with this set
this and tSet.addAll(Collection c)public Set difference(Set t)
S.subtract(T) are those objects which are members of
S but not of T.
t - the set to subtract from this set
this and tSet.removeAll(Collection c)public Set intersection(Set t)
S.intersect(T) are those objects which are members of both
S and T.
t - the set with which to intersect
this and tSet.retainAll(Collection c)public boolean isSubsetOf(Set t)
t - the given set with which to compare
true if this set is a subset of tpublic boolean isSupersetOf(Set t)
t - the given set with which to compare
true if this set is a superset of tpublic Relation identity()
Relation for this setpublic Relation cartesianProduct(Set y)
y - the set Y in X x Y
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||