wugle.expression
Class ExpressionOperation

java.lang.Object
  |
  +--wugle.expression.ExpressionOperation
Direct Known Subclasses:
LogicOperation

public abstract class ExpressionOperation
extends java.lang.Object

Delegation object for various operations.

Expressions implementing the various operation interfaces can use this class for delegating the operation. This is an abstract class because not all of the operations are generic enough the be implemented here. Subpackages should provide a subclass that implements the abstract operation methods and any operations specific to the package.

Any operation methods not declared here are too implementation specific for a delegated operation.

Version:
0.1.3
Author:
Jacob Perkins

Constructor Summary
ExpressionOperation()
           
 
Method Summary
 Associative associateLeft(Associative operator)
           
 Associative associateRight(Associative operator)
           
 boolean canAssociateLeft(Associative operator)
           
 boolean canAssociateRight(Associative operator)
           
 boolean canDeMorgans(DeMorgans operator)
           
 boolean canDistributeExpand(Distributive operator)
           
 boolean canDistributeReduce(Distributive operator)
           
 boolean canIdempotent(Idempotent operator)
           
 boolean canIdentity(Identity operator)
           
 void commute(Commutative operator)
           
 Distributive distributeExpand(Distributive operator)
           
 Distributive distributeReduce(Distributive operator)
           
 Dominator dominate(Dominatable operator)
           
 DoubleComplement doubleComplement(DoubleComplement expression)
           
 DoubleNegatable doubleNegate(DoubleNegatable expression)
           
 Expression idempotent(Idempotent operator)
           
 void idempotent(Idempotent operator, Expression child)
           
 Expression identity(Identity operator)
           
 void identity(Identity operator, Expression child)
           
 void setChild(Operator parent, Expression oldChild, Expression newChild)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionOperation

public ExpressionOperation()
Method Detail

setChild

public void setChild(Operator parent,
                     Expression oldChild,
                     Expression newChild)

canAssociateLeft

public boolean canAssociateLeft(Associative operator)
See Also:
associateLeft(Associative), canAssociateRight(Associative), Associative.canAssociateLeft()

associateLeft

public Associative associateLeft(Associative operator)
                          throws java.lang.Exception
java.lang.Exception
See Also:
canAssociateLeft(Associative), associateRight(Associative), Associative.associateLeft()

canAssociateRight

public boolean canAssociateRight(Associative operator)
See Also:
associateRight(Associative), canAssociateLeft(Associative), Associative.canAssociateRight()

associateRight

public Associative associateRight(Associative operator)
                           throws java.lang.Exception
java.lang.Exception
See Also:
canAssociateRight(Associative), associateLeft(Associative), Associative.associateRight()

commute

public void commute(Commutative operator)

canDeMorgans

public boolean canDeMorgans(DeMorgans operator)

canDistributeExpand

public boolean canDistributeExpand(Distributive operator)

distributeExpand

public Distributive distributeExpand(Distributive operator)
                              throws java.lang.Exception
java.lang.Exception

canDistributeReduce

public boolean canDistributeReduce(Distributive operator)

distributeReduce

public Distributive distributeReduce(Distributive operator)
                              throws java.lang.Exception
java.lang.Exception

dominate

public Dominator dominate(Dominatable operator)
                   throws java.lang.Exception
java.lang.Exception

doubleComplement

public DoubleComplement doubleComplement(DoubleComplement expression)

doubleNegate

public DoubleNegatable doubleNegate(DoubleNegatable expression)

canIdempotent

public boolean canIdempotent(Idempotent operator)

idempotent

public Expression idempotent(Idempotent operator)
                      throws java.lang.Exception
java.lang.Exception

idempotent

public void idempotent(Idempotent operator,
                       Expression child)

canIdentity

public boolean canIdentity(Identity operator)

identity

public Expression identity(Identity operator)
                    throws java.lang.Exception
java.lang.Exception

identity

public void identity(Identity operator,
                     Expression child)