Class Var

java.lang.Object
  |
  +--LogicTree
        |
        +--Unit
              |
              +--Var

class Var
extends Unit

a LogicTree tree for a variable with a given name


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 value
          the representation of this leaf as a string
 
Constructor Summary
(package private) Var(char name)
           
 
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

value

java.lang.String value
the representation of this leaf as a string


C0

static LogicTree C0
C0 is a tree for the constant 0 (false).


C1

static LogicTree C1
C1 is a tree for the constant 1 (true).


additionalIndentation

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.

Constructor Detail

Var

Var(char name)
Method Detail

toStringBuffer

public void toStringBuffer(java.lang.String indentation,
                           java.lang.StringBuffer buffer)
Description copied from class: LogicTree
Put the tree's representation into a StringBuffer.

Specified by:
toStringBuffer in class LogicTree

toString

public java.lang.String toString()
Convert the tree to a String representation.

Overrides:
toString in class java.lang.Object

isFailure

public boolean isFailure()
Tell whether this tree is a failure.


iff

public static LogicTree iff(LogicTree leftSubtree,
                            LogicTree rightSubtree)
pseudo-constructor for an "iff" tree


implies

public static LogicTree implies(LogicTree leftSubtree,
                                LogicTree rightSubtree)
pseudo-constructor for an "implies" tree


or

public static LogicTree or(LogicTree leftSubtree,
                           LogicTree rightSubtree)
pseudo-constructor for an "or" tree


and

public static LogicTree and(LogicTree leftSubtree,
                            LogicTree rightSubtree)
pseudo-constructor for an "and" tree


not

public static LogicTree not(LogicTree subtree)
pseudo-constructor for a "not" tree


var

public static LogicTree var(char name)
pseudo-constructor for a logical variable


failure

public static LogicTree failure(java.lang.String cause)
pseudo-constructor for a failure


main

public static void main(java.lang.String[] arg)
test program that constructs several trees and displays them