|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An extension of java.util.Set
for representing mathematical
sets.
Set
,
AbstractMathSet
,
AbstractSetOfSets
,
HashMathSet
,
HashSetOfSets
Method Summary | |
MathSet |
difference(java.util.Set s)
Returns the asymmetric difference between this mathematical set and the specified set. |
SetOfSets |
fixedSizeSubsets(int size)
Returns all possible subsets of this set with the specified size, contained in a SetOfSets instance. |
MathSet |
intersection(java.util.Set s)
Returns the intersection with the specified set. |
boolean |
isDisjoint(java.util.Set s)
Returns true if the specified set has no common elements
with this mathematical set. |
boolean |
isSubset(java.util.Set s)
Returns true if this mathematical set is a subset of the
specified set. |
boolean |
isSuperset(java.util.Set s)
Returns true if this mathematical set is a superset of the
specified set. |
SetOfSets |
powerSet()
Returns the power set of this mathematical set. |
MathSet |
symmetricDifference(java.util.Set s)
Returns the symmetric difference between this mathematical set and the specified set. |
MathSet |
union(java.util.Set s)
Returns the union with the specified 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 boolean isSuperset(java.util.Set s)
true
if this mathematical set is a superset of the
specified set. That is, if all elements of the specified set are also
present in this mathematical set.
s
- set for which is checked whether this mathematical set is a
superset of or not.
true
if this mathematical set is a superset,
false
otherwise.public boolean isSubset(java.util.Set s)
true
if this mathematical set is a subset of the
specified set. That is, if all elements of this mathematical set are also
present in the specified set.
s
- set for which is checked whether this mathematical set is a
subset of or not.
true
if this mathematical set is a subset,
false
otherwise.public boolean isDisjoint(java.util.Set s)
true
if the specified set has no common elements
with this mathematical set.
s
- set to be checked for common elements.
true
if there are common elements,
false
otherwise.public MathSet union(java.util.Set s)
MathSet
containing all elements that are present in this
mathematical set or in the specified set.
s
- set that is to be united with.
public MathSet intersection(java.util.Set s)
MathSet
containing all elements that are present in this
mathematical set as well as in the specified set.
s
- set that is to be intersected with.
public MathSet difference(java.util.Set s)
MathSet
containing all elements
that are present in this mathematical set but not in the specified set.
s
- set from what the difference is calculated.
public MathSet symmetricDifference(java.util.Set s)
MathSet
containing all elements
that are present either in this mathematical set or in the specified set
but not in both.
s
- set from what the symmetric difference is calculated
public SetOfSets powerSet()
public SetOfSets fixedSizeSubsets(int size)
SetOfSets
instance. In case the
size
parameter is negative or greater than the size of the
set itself, an empty SetOfSets
is returned.
size
- size of the returned subsets.
SetOfSets
containing all subsets of this
mathematical set with the specified size.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |