|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--LogicTree
|
+--UnaryTree
a logic tree with a generic unary operator
| 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). |
(package private) java.lang.String |
op
the operator |
(package private) LogicTree |
subtree
the one subtree of this tree |
| Constructor Summary | |
(package private) |
UnaryTree(java.lang.String op,
LogicTree subtree)
Construct a logic tree with a generic unary operator. |
| 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. |
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 |
java.lang.String op
LogicTree subtree
static LogicTree C0
static LogicTree C1
static java.lang.String additionalIndentation
| Constructor Detail |
UnaryTree(java.lang.String op,
LogicTree subtree)
| Method Detail |
public void toStringBuffer(java.lang.String indentation,
java.lang.StringBuffer buffer)
LogicTree
toStringBuffer in class LogicTreepublic java.lang.String toString()
toString in class java.lang.Objectpublic 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 | |||||||||