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)
_FormulaSet
true
if this
set did not already contain the specified formula.add
in interface _FormulaSet
swff
- the formula to be added to this settrue
if this set did not already contain the specified
formulapublic boolean remove(Formula wff)
_FormulaSet
remove
in interface _FormulaSet
wff
- the formula to remove.true
if this set contained the specified formula.public Formula getFirst()
_FormulaSet
null
if this set is
empty.getFirst
in interface _FormulaSet
null
if this
set is empty.public java.util.Collection<Formula> getAllFormulas()
_FormulaSet
null
if this set is empty.getAllFormulas
in interface _FormulaSet
null
if
this set is empty.public int cardinality()
_FormulaSet
cardinality
in interface _FormulaSet
public boolean isEmpty()
_FormulaSet
true
if and only if this set is empty.isEmpty
in interface _FormulaSet
true
if and only if this set is empty.public boolean contains(Formula swff)
_FormulaSet
true
if and only if this set contains the specified
formula.contains
in interface _FormulaSet
swff
- the formula to search.true
if and only if this set contains the specified
formula.public void addAll(_FormulaSet other)
_FormulaSet
addAll
in interface _FormulaSet
other
- the set of formulas to add to this set.public java.util.Iterator<Formula> iterator()
_FormulaSet
iterator
in interface java.lang.Iterable<Formula>
iterator
in interface _FormulaSet
public FormulaSetOnHashSet clone()
_FormulaSet
clone
in interface _FormulaSet
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Formula[] toArray()
_FormulaSet
toArray
in interface _FormulaSet
public java.lang.String toString()
toString
in class java.lang.Object