|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmathCollection.MathCollections.SynchronizedMathSet
Field Summary | |
private MathSet |
myMathSet
|
private java.lang.Object |
myMutex
|
Constructor Summary | |
(package private) |
MathCollections.SynchronizedMathSet(MathSet ms)
|
(package private) |
MathCollections.SynchronizedMathSet(MathSet ms,
java.lang.Object mutex)
|
Method Summary | |
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
MathSet |
difference(java.util.Set s)
Returns the asymmetric difference between this mathematical set and the specified set. |
boolean |
equals(java.lang.Object o)
|
SetOfSets |
fixedSizeSubsets(int size)
Returns all possible subsets of this set with the specified size, contained in a SetOfSets instance. |
int |
hashCode()
|
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 |
isEmpty()
|
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. |
java.util.Iterator |
iterator()
|
SetOfSets |
powerSet()
Returns the power set of this mathematical set. |
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
retainAll(java.util.Collection c)
|
int |
size()
|
MathSet |
symmetricDifference(java.util.Set s)
Returns the symmetric difference between this mathematical set and the specified set. |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] o)
|
java.lang.String |
toString()
|
MathSet |
union(java.util.Set s)
Returns the union with the specified set. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private MathSet myMathSet
private java.lang.Object myMutex
Constructor Detail |
MathCollections.SynchronizedMathSet(MathSet ms)
MathCollections.SynchronizedMathSet(MathSet ms, java.lang.Object mutex)
Method Detail |
public int size()
size
in interface java.util.Set
public boolean isEmpty()
isEmpty
in interface java.util.Set
public void clear()
clear
in interface java.util.Set
public boolean equals(java.lang.Object o)
equals
in interface java.util.Set
public int hashCode()
hashCode
in interface java.util.Set
public java.lang.String toString()
public java.lang.Object[] toArray()
toArray
in interface java.util.Set
public java.lang.Object[] toArray(java.lang.Object[] o)
toArray
in interface java.util.Set
public java.util.Iterator iterator()
iterator
in interface java.util.Set
public java.lang.Object clone()
public boolean add(java.lang.Object o)
add
in interface java.util.Set
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Set
public boolean contains(java.lang.Object o)
contains
in interface java.util.Set
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Set
public boolean remove(java.lang.Object o)
remove
in interface java.util.Set
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Set
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Set
public MathSet union(java.util.Set s)
MathSet
MathSet
containing all elements that are present in this
mathematical set or in the specified set.
union
in interface MathSet
s
- set that is to be united with.
public MathSet intersection(java.util.Set s)
MathSet
MathSet
containing all elements that are present in this
mathematical set as well as in the specified set.
intersection
in interface MathSet
s
- set that is to be intersected with.
public MathSet difference(java.util.Set s)
MathSet
MathSet
containing all elements
that are present in this mathematical set but not in the specified set.
difference
in interface MathSet
s
- set from what the difference is calculated.
public MathSet symmetricDifference(java.util.Set s)
MathSet
MathSet
containing all elements
that are present either in this mathematical set or in the specified set
but not in both.
symmetricDifference
in interface MathSet
s
- set from what the symmetric difference is calculated
public boolean isDisjoint(java.util.Set s)
MathSet
true
if the specified set has no common elements
with this mathematical set.
isDisjoint
in interface MathSet
s
- set to be checked for common elements.
true
if there are common elements,
false
otherwise.public boolean isSubset(java.util.Set s)
MathSet
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.
isSubset
in interface MathSet
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 isSuperset(java.util.Set s)
MathSet
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.
isSuperset
in interface MathSet
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 SetOfSets powerSet()
MathSet
powerSet
in interface MathSet
public SetOfSets fixedSizeSubsets(int size)
MathSet
SetOfSets
instance. In case the
size
parameter is negative or greater than the size of the
set itself, an empty SetOfSets
is returned.
fixedSizeSubsets
in interface MathSet
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 | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |