org.reprap.utilities
Class BooleanExpression

java.lang.Object
  extended by org.reprap.utilities.BooleanExpression

 class BooleanExpression
extends java.lang.Object

Author:
adrian

Field Summary
private  BooleanExpression c1
           
private  BooleanExpression c2
           
private  Variable leaf
           
private  int leafCount
           
private  Bop leafOp
           
private  Variable[] variables
           
 
Constructor Summary
BooleanExpression(BooleanExpression[] be, int exp)
          Make an expression from three or four atomic expressions in an array.
BooleanExpression(BooleanExpression a, BooleanExpression b, Bop op)
          Operand and two operators
BooleanExpression(BooleanExpression a, Bop op)
          Monadic operator
BooleanExpression(Variable v)
          Variable leaf
BooleanExpression(Variable[] v, int exp)
          Make an expression from three or four variables in an array.
 
Method Summary
 int getIndex(Variable v)
           
 Variable[] getVariables()
           
 int leafCount()
           
private  void makeFromSeveral(BooleanExpression[] be, int exp)
          Make an expression from three or four atomic expressions in an array.
private  void recordVariables()
           
 void setAll(int i)
           
private  java.lang.String toJava_r(java.lang.String r)
           
 java.lang.String toJava()
           
 boolean value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c1

private BooleanExpression c1

c2

private BooleanExpression c2

leafOp

private Bop leafOp

leaf

private Variable leaf

variables

private Variable[] variables

leafCount

private int leafCount
Constructor Detail

BooleanExpression

public BooleanExpression(BooleanExpression[] be,
                         int exp)
Make an expression from three or four atomic expressions in an array. exp decides the expression.

Parameters:
variables -
exp -

BooleanExpression

public BooleanExpression(Variable[] v,
                         int exp)
Make an expression from three or four variables in an array. exp decides the expression.

Parameters:
variables -
exp -

BooleanExpression

public BooleanExpression(BooleanExpression a,
                         BooleanExpression b,
                         Bop op)
Operand and two operators

Parameters:
a -
b -
op -

BooleanExpression

public BooleanExpression(BooleanExpression a,
                         Bop op)
Monadic operator

Parameters:
a -
op -

BooleanExpression

public BooleanExpression(Variable v)
Variable leaf

Method Detail

makeFromSeveral

private void makeFromSeveral(BooleanExpression[] be,
                             int exp)
Make an expression from three or four atomic expressions in an array. exp decides the expression.

Parameters:
variables -
exp -

leafCount

public int leafCount()
Returns:

recordVariables

private void recordVariables()

setAll

public void setAll(int i)

getVariables

public Variable[] getVariables()

getIndex

public int getIndex(Variable v)

value

public boolean value()
Parameters:
v -
Returns:

toJava_r

private java.lang.String toJava_r(java.lang.String r)

toJava

public java.lang.String toJava()