|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--LogicTree
A LogicTree represents the syntax of a propositional logic expression.
| Field Summary | |
(package private) static java.lang.String |
additionalIndentation
additionalIndentation determines how much additional Indentation there is at each level of the tree when it is converted to a String. |
(package private) static LogicTree |
C0
C0 is a tree for the constant 0 (false). |
(package private) static LogicTree |
C1
C1 is a tree for the constant 1 (true). |
| Constructor Summary | |
(package private) |
LogicTree()
|
| Method Summary | |
static LogicTree |
and(LogicTree leftSubtree,
LogicTree rightSubtree)
pseudo-constructor for an "and" tree |
static LogicTree |
failure(java.lang.String cause)
pseudo-constructor for a failure |
static LogicTree |
iff(LogicTree leftSubtree,
LogicTree rightSubtree)
pseudo-constructor for an "iff" tree |
static LogicTree |
implies(LogicTree leftSubtree,
LogicTree rightSubtree)
pseudo-constructor for an "implies" tree |
boolean |
isFailure()
Tell whether this tree is a failure. |
static void |
main(java.lang.String[] arg)
test program that constructs several trees and displays them |
static LogicTree |
not(LogicTree subtree)
pseudo-constructor for a "not" tree |
static LogicTree |
or(LogicTree leftSubtree,
LogicTree rightSubtree)
pseudo-constructor for an "or" tree |
java.lang.String |
toString()
Convert the tree to a String representation. |
abstract void |
toStringBuffer(java.lang.String indentation,
java.lang.StringBuffer buffer)
Put the tree's representation into a StringBuffer. |
static LogicTree |
var(char name)
pseudo-constructor for a logical variable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
static LogicTree C0
static LogicTree C1
static java.lang.String additionalIndentation
| Constructor Detail |
LogicTree()
| Method Detail |
public java.lang.String toString()
toString in class java.lang.Object
public abstract void toStringBuffer(java.lang.String indentation,
java.lang.StringBuffer buffer)
public boolean isFailure()
public static LogicTree iff(LogicTree leftSubtree,
LogicTree rightSubtree)
public static LogicTree implies(LogicTree leftSubtree,
LogicTree rightSubtree)
public static LogicTree or(LogicTree leftSubtree,
LogicTree rightSubtree)
public static LogicTree and(LogicTree leftSubtree,
LogicTree rightSubtree)
public static LogicTree not(LogicTree subtree)
public static LogicTree var(char name)
public static LogicTree failure(java.lang.String cause)
public static void main(java.lang.String[] arg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||