public class BitSetOfFormulas extends java.util.BitSet implements _FormulaSet, java.lang.Iterable<Formula>
| Constructor and Description |
|---|
BitSetOfFormulas(FormulaFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Formula wff)
Add the specified formula to this set and returns
true if this
set did not already contain the specified formula. |
void |
addAll(_FormulaSet set)
Add all the formulas in the specified set to this formula set.
|
void |
addAll(BitSetOfFormulas set) |
void |
and(BitSetOfFormulas set) |
BitSetOfFormulas |
clone()
Returns a fresh copy of this set.
|
boolean |
contains(Formula wff)
Returns
true if and only if this set contains the specified
formula. |
boolean |
containsFormulaOfType(FormulaType type) |
java.util.Collection<Formula> |
getAllFormulas()
Returns the collection containing all the formulas in this set or null if
this set is empty.
|
java.util.Collection<Formula> |
getAllFormulas(FormulaType formulaType)
Returns a collection containing all formulas with the specified formula
type in this set or null if this set does not contain any formulas with the
specified formula type.
|
BitSetOfFormulas |
getBitsetOfAllFormulas(FormulaType formulaType)
Returns bitset of all the formulas with the specified formula type in this
set or null if this set does not contain any formulas with the specified
formula type.
|
FormulaFactory |
getFactory() |
Formula |
getFirst()
Returns the first formula in this set or
null if this set is
empty. |
Formula |
getFirst(FormulaType type) |
Formula |
getFirstAndRemove()
Returns the first formula of this bitset and remove it from the bitset.
|
Formula |
getFirstAndRemove(FormulaType type)
Returns the first formula with the specified type of this bitset and remove
it from the bitset.
|
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.
|
boolean |
subseteq(BitSetOfFormulas other) |
boolean |
superseteq(BitSetOfFormulas other) |
Formula[] |
toArray()
Returns an array of formulas containing all of the formulas in this set.
|
java.lang.String |
toString() |
and, andNot, cardinality, clear, clear, clear, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, set, set, set, set, size, stream, toByteArray, toLongArray, valueOf, valueOf, valueOf, valueOf, xorcardinality, isEmptypublic BitSetOfFormulas(FormulaFactory factory)
public boolean add(Formula wff)
_FormulaSettrue if this
set did not already contain the specified formula.add in interface _FormulaSetwff - the formula to be added to this settrue if this set did not already contain the specified
formulapublic void addAll(_FormulaSet set)
_FormulaSetaddAll in interface _FormulaSetset - the set of formulas to add to this set.public void addAll(BitSetOfFormulas set)
public void and(BitSetOfFormulas set)
public BitSetOfFormulas clone()
_FormulaSetclone in interface _FormulaSetclone in class java.util.BitSetpublic boolean contains(Formula wff)
_FormulaSettrue if and only if this set contains the specified
formula.contains in interface _FormulaSetwff - the formula to search.true if and only if this set contains the specified
formula.public boolean containsFormulaOfType(FormulaType type)
public java.util.Collection<Formula> getAllFormulas()
getAllFormulas in interface _FormulaSetpublic java.util.Collection<Formula> getAllFormulas(FormulaType formulaType)
formulaType - the type of the formulas to return.null if no formula with the specified type belong to
this set.public BitSetOfFormulas getBitsetOfAllFormulas(FormulaType formulaType)
formulaType - the type of the formulas to return.null if this set does not contain formulas with the
specified type.public Formula getFirst()
_FormulaSetnull if this set is
empty.getFirst in interface _FormulaSetnull if this
set is empty.public Formula getFirstAndRemove()
null if this bitset is empty.null if this
bitset is empty.public Formula getFirstAndRemove(FormulaType type)
null if this bitset
does not contain any formula of the specified type.type - the type of the formula to return.null.public Formula getFirst(FormulaType type)
public FormulaFactory getFactory()
public java.util.Iterator<Formula> iterator()
_FormulaSetiterator in interface java.lang.Iterable<Formula>iterator in interface _FormulaSetpublic boolean remove(Formula wff)
_FormulaSetremove in interface _FormulaSetwff - the formula to remove.true if this set contained the specified formula.public Formula[] toArray()
_FormulaSettoArray in interface _FormulaSetpublic boolean subseteq(BitSetOfFormulas other)
public boolean superseteq(BitSetOfFormulas other)
public java.lang.String toString()
toString in class java.util.BitSet