|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qedeq.kernel.se.dto.list.ElementSet
public class ElementSet
This class represents a set of Elements.
| Constructor Summary | |
|---|---|
ElementSet()
Constructs an empty element set. |
|
ElementSet(Element[] elements)
Constructs an element set. |
|
ElementSet(ElementList element)
Constructs an element set from all operands of an element. |
|
ElementSet(ElementSet set)
Constructs an element set. |
|
| Method Summary | |
|---|---|
ElementSet |
add(Element element)
Add an element to set. |
boolean |
contains(Element element)
Is element in set? |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
ElementSet |
intersection(ElementSet set)
Build the intersection. |
boolean |
isEmpty()
Is this set empty? |
boolean |
isSubset(ElementSet set)
Is set a superset of this set? |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this set. |
ElementSet |
minus(ElementSet set)
Remove elements from another ElementSet from this set. |
ElementSet |
newDelta(ElementSet set)
Return all elements that are only in one of both sets. |
ElementSet |
newIntersection(ElementSet set)
Build a new intersection. |
ElementSet |
remove(Element element)
Remove an element from this set. |
int |
size()
Get number of elements. |
java.lang.String |
toString()
|
ElementSet |
union(ElementSet set)
Add elements from another ElementSet to this set. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ElementSet()
public ElementSet(Element[] elements)
elements - the elements to put into the set
java.lang.IllegalArgumentException - if elements was a NullPointerpublic ElementSet(ElementSet set)
set - contains the elements to put into the set
java.lang.IllegalArgumentException - if set was a
NullPointerpublic ElementSet(ElementList element)
element - contains the elements to put into the set
(without the operator)
java.lang.IllegalArgumentException - if element was a
NullPointer or was an atom.| Method Detail |
|---|
public final boolean contains(Element element)
element - Element to check for.
element in this set?
java.lang.IllegalArgumentException - if the element was a
NullPointerpublic final boolean isEmpty()
public final boolean isSubset(ElementSet set)
set a superset of this set?
set - Set to check for.
set?
java.lang.IllegalArgumentException - if the set was a NullPointerpublic final ElementSet add(Element element)
element}
element - element to put into the set
this.
java.lang.IllegalArgumentException - if the element was a
NullPointerpublic final ElementSet union(ElementSet set)
ElementSet to this set.
After this method this object is the union of the two sets.
set - add all elements that are here
this.
java.lang.IllegalArgumentException - if the set was a
NullPointerpublic final ElementSet remove(Element element)
element - Element to remove from the set. Must not be null.
this.
java.lang.IllegalArgumentException - if the element was a
NullPointerpublic final ElementSet minus(ElementSet set)
ElementSet from this set.
After this method this object is the asymmetric set difference of the
two sets: this \ set.
set - Remove all elements that are in this set from
this.
this.
java.lang.IllegalArgumentException - if the set was a
NullPointerpublic final ElementSet intersection(ElementSet set)
set - Check for these elements.
this.
java.lang.IllegalArgumentException - if the set was a
NullPointerpublic final ElementSet newIntersection(ElementSet set)
set - check for these elements
this
and set.
java.lang.IllegalArgumentException - if the set was a
NullPointerpublic final ElementSet newDelta(ElementSet set)
set - Build the symmetric difference with this set.
this
java.lang.IllegalArgumentException - if the set was a
NullPointerpublic final int size()
public java.util.Iterator iterator()
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||