wugle.expression
Interface Expression

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
Associative, BinaryOperator, Commutative, DeMorgans, Distributive, Dominatable, Dominator, DoubleComplement, DoubleNegatable, Idempotent, Identity, ImpliesRule, Operator, Tautology, TruthValue, UnaryOperator, Value, XorRule
All Known Implementing Classes:
AbstractBinaryOperator, AbstractExpression, AbstractUnaryOperator, AbstractValue, False, Implies, Literal, LogicBinaryOperator, Not, Or, True, Xor

public interface Expression
extends java.lang.Cloneable

Generic Expression that has a symbol and can have a parent Operator.

Version:
0.1.3
Author:
Jacob Perkins
See Also:
Operator

Method Summary
 java.lang.Object clone()
          Returns a copy of this Expression.
 Operator getParent()
          Gets the parent Operator, or null if there is no parent.
 java.lang.String getSymbol()
          Gets the Expression's symbol.
 boolean isEqual(Expression expression)
          Tests if this Expression is equal to the given Expression.
 void setParent(Operator parent)
          Sets the parent Operator.
 

Method Detail

clone

public java.lang.Object clone()
Returns a copy of this Expression.

Returns:
Copy of the Expression

getParent

public Operator getParent()
Gets the parent Operator, or null if there is no parent.

Returns:
Parent Operator

setParent

public void setParent(Operator parent)
Sets the parent Operator.

Parameters:
parent - Parent Operator, or null for no parent

getSymbol

public java.lang.String getSymbol()
Gets the Expression's symbol.

Returns:
String representing the Expression

isEqual

public boolean isEqual(Expression expression)
Tests if this Expression is equal to the given Expression.

Parameters:
expression - Expression to compare to
Returns:
true if they are equal