public class FormulaSetOnHashSet extends java.lang.Object implements java.lang.Iterable<Formula>, _FormulaSet
| Constructor and Description |
|---|
FormulaSetOnHashSet()
Builds an empty set of signed formulas.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Formula swff)
Add the specified formula to this set and returns
true if this
set did not already contain the specified formula. |
void |
addAll(_FormulaSet other)
Add all the formulas in the specified set to this formula set.
|
int |
cardinality()
The number of elements in this set.
|
FormulaSetOnHashSet |
clone()
Returns a fresh copy of this set.
|
boolean |
contains(Formula swff)
Returns
true if and only if this set contains the specified
formula. |
boolean |
equals(java.lang.Object obj) |
java.util.Collection<Formula> |
getAllFormulas()
Returns a collection containing all the formulas in this set or
null if this set is empty. |
Formula |
getFirst()
Returns the first formula in this set or
null if this set is
empty. |
boolean |
isEmpty()
Returns
true if and only if this set is empty. |
java.util.Iterator<Formula> |
iterator()
Returns an iterator over the formulas in this set.
|
boolean |
remove(Formula wff)
Returns the specified formula from this set.
|
Formula[] |
toArray()
Returns an array of formulas containing all of the formulas in this set.
|
java.lang.String |
toString() |
public FormulaSetOnHashSet()
public boolean add(Formula swff)
_FormulaSettrue if this
set did not already contain the specified formula.add in interface _FormulaSetswff - the formula to be added to this settrue if this set did not already contain the specified
formulapublic boolean remove(Formula wff)
_FormulaSetremove in interface _FormulaSetwff - the formula to remove.true if this set contained the specified formula.public Formula getFirst()
_FormulaSetnull if this set is
empty.getFirst in interface _FormulaSetnull if this
set is empty.public java.util.Collection<Formula> getAllFormulas()
_FormulaSetnull if this set is empty.getAllFormulas in interface _FormulaSetnull if
this set is empty.public int cardinality()
_FormulaSetcardinality in interface _FormulaSetpublic boolean isEmpty()
_FormulaSettrue if and only if this set is empty.isEmpty in interface _FormulaSettrue if and only if this set is empty.public boolean contains(Formula swff)
_FormulaSettrue if and only if this set contains the specified
formula.contains in interface _FormulaSetswff - the formula to search.true if and only if this set contains the specified
formula.public void addAll(_FormulaSet other)
_FormulaSetaddAll in interface _FormulaSetother - the set of formulas to add to this set.public java.util.Iterator<Formula> iterator()
_FormulaSetiterator in interface java.lang.Iterable<Formula>iterator in interface _FormulaSetpublic FormulaSetOnHashSet clone()
_FormulaSetclone in interface _FormulaSetclone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Formula[] toArray()
_FormulaSettoArray in interface _FormulaSetpublic java.lang.String toString()
toString in class java.lang.Object