Hilbert II - Version 0.03.04

org.qedeq.kernel.bo.logic
Class EqualFormulaSet

java.lang.Object
  extended byorg.qedeq.kernel.bo.logic.EqualFormulaSet

public class EqualFormulaSet
extends Object

This class represents a set of Elements.

Version:
$Revision: 1.6 $

Constructor Summary
  EqualFormulaSet()
          Constructs an empty element set.
  EqualFormulaSet(ElementList element)
          Constructs an element set from all operands of an element.
  EqualFormulaSet(EqualFormula[] formulas)
          Constructs an element set.
(package private) EqualFormulaSet(EqualFormulaSet set)
          Constructs an equal formulas set.
 
Method Summary
 EqualFormulaSet add(EqualFormula formula)
          Add a formula to set.
 boolean contains(EqualFormula formula)
          Is element in set?
 boolean equals(Object obj)
           
 int hashCode()
           
 EqualFormulaSet intersection(EqualFormulaSet set)
          Build the intersection.
 boolean isEmpty()
          Is set empty?
 boolean isSubset(EqualFormulaSet set)
          Is set a subset of this set?
 EqualFormulaSet minus(EqualFormulaSet set)
          Remove elements from another EqualFormulaSet from this set.
 EqualFormulaSet newIntersection(EqualFormulaSet set)
          Build a new intersection.
 EqualFormulaSet remove(EqualFormula formula)
          Remove an element from set.
 String toString()
           
 EqualFormulaSet union(EqualFormulaSet set)
          After this method this object is the union of the two sets.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EqualFormulaSet

public EqualFormulaSet()
Constructs an empty element set.


EqualFormulaSet

public EqualFormulaSet(EqualFormula[] formulas)
Constructs an element set.

Parameters:
formulas - the elements to put into the set
Throws:
IllegalArgumentException - if elements was a NullPointer

EqualFormulaSet

EqualFormulaSet(EqualFormulaSet set)
Constructs an equal formulas set.

Parameters:
set - Contains the elements to put into the set.
Throws:
IllegalArgumentException - set was a NullPointer.

EqualFormulaSet

public EqualFormulaSet(ElementList element)
Constructs an element set from all operands of an element. The element must not be a symbol.

Parameters:
element - Contains the elements to put into the set (without the operator).
Throws:
IllegalArgumentException - element was a NullPointer or was an atom.
Method Detail

contains

public final boolean contains(EqualFormula formula)
Is element in set?

Parameters:
formula - Element to check for.
Returns:
Is formula in this set?
Throws:
IllegalArgumentException - element was a NullPointer.

isEmpty

public final boolean isEmpty()
Is set empty?

Returns:
Is this set empty?

isSubset

public final boolean isSubset(EqualFormulaSet set)
Is set a subset of this set?

Parameters:
set - set to check for.
Returns:
is set a subset of this set?
Throws:
IllegalArgumentException - set was a NullPointer

add

public final EqualFormulaSet add(EqualFormula formula)
Add a formula to set. This object is after the method the union of this set with element

Parameters:
formula - FormulaOrTerm to put into the set.
Returns:
this.
Throws:
IllegalArgumentException - formula was a NullPointer.

union

public final EqualFormulaSet union(EqualFormulaSet set)
After this method this object is the union of the two sets.

Parameters:
set - Add all formulas that are here in.
Returns:
this.
Throws:
IllegalArgumentException - set was a NullPointer.

remove

public final EqualFormulaSet remove(EqualFormula formula)
Remove an element from set.

Parameters:
formula - FormulaOrTerm to remove from the set
Returns:
this.
Throws:
IllegalArgumentException - formula was a NullPointer.

minus

public final EqualFormulaSet minus(EqualFormulaSet set)
Remove elements from another EqualFormulaSet from this set. After this method this object is the asymmetric set difference of the two sets: this \ set.

Parameters:
set - Remove all elements that are in this set from this.
Returns:
Was this set changed?
Throws:
IllegalArgumentException - set was a NullPointer

intersection

public final EqualFormulaSet intersection(EqualFormulaSet set)
Build the intersection.

Parameters:
set - Check for these elements.
Returns:
Has this set changed?
Throws:
IllegalArgumentException - set was a NullPointer

newIntersection

public final EqualFormulaSet newIntersection(EqualFormulaSet set)
Build a new intersection.

Parameters:
set - check for these elements
Returns:
was this set changed?
Throws:
IllegalArgumentException - if the set was a NullPointer

equals

public final boolean equals(Object obj)

hashCode

public final int hashCode()

toString

public final String toString()

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.