public class BTFormulaCompound extends BTFormula
Constructor and Description |
---|
BTFormulaCompound(PropositionalConnective mainConnective,
BTFormula subformula)
Builds the compound formula with the specified unary connective and the
specified sub-formula.
|
BTFormulaCompound(PropositionalConnective mainConnective,
BTFormula left,
BTFormula right)
Builds the compound formula with the specified binary infix connective and
the specified sub-formulas.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
format()
Returns the string representation of the formula
|
BTFormula[] |
immediateSubformulas()
The immediate subformulas of this formula.
|
boolean |
isAtomic()
Returns
true iff this formula is atomic. |
boolean |
isCompound()
Returns
true iff this formula is compound. |
PropositionalConnective |
mainConnective()
The main logical operator of this formula.
|
java.lang.String |
shortName()
Returns the short name of the formula.
|
java.lang.String |
toString()
Returns the string representation of the formula.
|
public BTFormulaCompound(PropositionalConnective mainConnective, BTFormula left, BTFormula right)
mainConnective
- a binary connective.left
- the left sub-formula.right
- the right sub-formula.public BTFormulaCompound(PropositionalConnective mainConnective, BTFormula subformula)
mainConnective
- a unary connective.subformula
- the sub-formula.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public BTFormula[] immediateSubformulas()
_PropositionalFormula
immediateSubformulas
in interface _PropositionalFormula
immediateSubformulas
in class BTFormula
public PropositionalConnective mainConnective()
_PropositionalFormula
mainConnective
in interface _PropositionalFormula
mainConnective
in class BTFormula
public boolean isAtomic()
_PropositionalFormula
true
iff this formula is atomic.true
iff this formula is atomic.public boolean isCompound()
_PropositionalFormula
true
iff this formula is compound.true
iff this formula is compound.public java.lang.String shortName()
_AbstractFormula
public java.lang.String format()
_AbstractFormula
public java.lang.String toString()
toString
in class java.lang.Object