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, xor
cardinality, isEmpty
public BitSetOfFormulas(FormulaFactory factory)
public boolean add(Formula wff)
_FormulaSet
true
if this
set did not already contain the specified formula.add
in interface _FormulaSet
wff
- the formula to be added to this settrue
if this set did not already contain the specified
formulapublic void addAll(_FormulaSet set)
_FormulaSet
addAll
in interface _FormulaSet
set
- the set of formulas to add to this set.public void addAll(BitSetOfFormulas set)
public void and(BitSetOfFormulas set)
public BitSetOfFormulas clone()
_FormulaSet
clone
in interface _FormulaSet
clone
in class java.util.BitSet
public boolean contains(Formula wff)
_FormulaSet
true
if and only if this set contains the specified
formula.contains
in interface _FormulaSet
wff
- 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 _FormulaSet
public 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()
_FormulaSet
null
if this set is
empty.getFirst
in interface _FormulaSet
null
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()
_FormulaSet
iterator
in interface java.lang.Iterable<Formula>
iterator
in interface _FormulaSet
public boolean remove(Formula wff)
_FormulaSet
remove
in interface _FormulaSet
wff
- the formula to remove.true
if this set contained the specified formula.public Formula[] toArray()
_FormulaSet
toArray
in interface _FormulaSet
public boolean subseteq(BitSetOfFormulas other)
public boolean superseteq(BitSetOfFormulas other)
public java.lang.String toString()
toString
in class java.util.BitSet