|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
org.zedlib.HashSet
A collection that contains no duplicate elements. As implied by its name, this class models the mathematical set abstraction.
| Constructor Summary | |
HashSet()
|
|
HashSet(Collection c)
Constructs a set containing all elements in the supplied collection |
|
HashSet(Object o)
Constructs a set containing only this object |
|
| Method Summary | |
Relation |
cartesianProduct(Set y)
Constructs the cartesian product (X x Y) of two sets X and Y. |
Set |
difference(Collection c)
Constructs the difference of this set with the collection of given sets. |
Set |
difference(Set t)
Returns the difference of a given set with this set. |
protected Set |
getInstance()
|
protected Set |
getInstance(Set s)
|
Relation |
identity()
Constructs a relation mapping each value in this set onto itself. |
Set |
intersection(Collection c)
Constructs the intersection of this set and the collection of given sets. |
Set |
intersection(Set t)
Returns the intersection of this set with a given set. |
boolean |
isProperSubsetOf(Set t)
Determines whether this set is a proper subset of 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(Collection c)
Constructs the union of this set with the collection of given sets. |
Set |
union(Set t)
Constructs the union of a given set with this set. |
| Methods inherited from class java.util.HashSet |
add, clear, clone, contains, isEmpty, iterator, remove, size |
| Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
public HashSet()
public HashSet(Collection c)
public HashSet(Object o)
| Method Detail |
protected Set getInstance()
protected Set getInstance(Set s)
public Set union(Set t)
S.union(T) are those objects which are members of
S or T or both.
union in interface Sett - the set to union with this set
this and tSet.addAll(Collection c)public Set union(Collection c)
public Set difference(Set t)
S.subtract(T) are those objects which are members of
S but not of T.
difference in interface Sett - the set to subtract from this set
this and tSet.removeAll(Collection c)public Set difference(Collection c)
public Set intersection(Set t)
S.intersect(T) are those objects which are members of both
S and T.
intersection in interface Sett - the set with which to intersect
this and tSet.retainAll(Collection c)public Set intersection(Collection c)
public boolean isSubsetOf(Set t)
isSubsetOf in interface Sett - the given set with which to compare
true if this set is a subset of tpublic boolean isProperSubsetOf(Set t)
t - the given set with which to compare
true if this set is a subset of tpublic boolean isSupersetOf(Set t)
isSupersetOf in interface Sett - the given set with which to compare
true if this set is a superset of tpublic Relation identity()
identity in interface SetRelation for this setpublic Relation cartesianProduct(Set y)
cartesianProduct in interface Sety - the set Y in X x Y
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||