|
|||||||||
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 sets of sets.
The primary set elements must implement the Set
interface.
The null element is not allowed.
Set
,
AbstractSetOfSets
,
HashSetOfSets
Method Summary | |
boolean |
add(java.lang.Object o)
Adds the specified element to this set if it is not already present. |
SetOfSets |
containingSets(java.lang.Object o)
Returns a set containing the elementary sets from within this set of sets that contain the specified element. |
boolean |
contains(java.lang.Object o)
Returns true if this set contains the specified element. |
boolean |
containsAtom(java.lang.Object o)
Returns true if this set of sets contains a set in which the
specified element is present. |
boolean |
remove(java.lang.Object o)
Removes the specified element from this set if it is present. |
SetOfSets |
subsets(java.util.Set s)
Returns a new set containing the subsets of the specified set. |
SetOfSets |
supersets(java.util.Set s)
Returns a new set containing the supersets of the specified set. |
Multiset |
toMultiset()
Returns the 'flattened' multiset version of this set of sets, containing the same elements as in all sets of this set of sets. |
java.util.Set |
toSet()
Returns the 'flattened' version of this set of sets, in which each basic element of this set of sets is present exactly once. |
Methods inherited from interface java.util.Set |
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray |
Method Detail |
public java.util.Set toSet()
public Multiset toMultiset()
public boolean containsAtom(java.lang.Object o)
true
if this set of sets contains a set in which the
specified element is present.
o
- the element whose presence in any elementary set within this
set of sets is tested for.
true
if any set within this set of sets contains
the specified element, false
otherwise.public SetOfSets containingSets(java.lang.Object o)
o
- the element that the returned sets have to contain.
public boolean add(java.lang.Object o)
add
in interface java.util.Set
o
- element to be added to this set.
true
if the set did not already contain the
specified element, false
otherwise.
java.lang.ClassCastException
- if the type of the specified element
is incompatible (!(o instanceof Set)
).public boolean remove(java.lang.Object o)
remove
in interface java.util.Set
o
- object to be removed from this set, if present.
true
if the set did contain the specified element,
false
otherwise.
java.lang.ClassCastException
- if the type of the specified element
is incompatible (!(o instanceof Set)
).public boolean contains(java.lang.Object o)
true
if this set contains the specified element.
contains
in interface java.util.Set
o
- element whose presence in this set is to be tested.
true
if this set contains the specified element,
false
otherwise.
java.lang.ClassCastException
- if the type of the specified element
is incompatible (!(o instanceof Set)
).public SetOfSets supersets(java.util.Set s)
s
- the set that the returned sets have to be supersets of.
public SetOfSets subsets(java.util.Set s)
s
- the set that the returned sets have to be subsets of.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |