wugle.expression
Class AbstractValue

java.lang.Object
  |
  +--wugle.expression.AbstractExpression
        |
        +--wugle.expression.AbstractValue
All Implemented Interfaces:
java.lang.Cloneable, Expression, Value
Direct Known Subclasses:
False, Literal, True

public abstract class AbstractValue
extends AbstractExpression
implements Value

An abstract implementation of Value.

AbstractValue provides a basic implementation of Value, but is not meant to be a full class. Subclass should implement the appropriate operation interfaces.

Version:
0.1.3
Author:
Jacob Perkins

Field Summary
 
Fields inherited from class wugle.expression.AbstractExpression
log, operation
 
Constructor Summary
AbstractValue(java.lang.Object value, ExpressionOperation operation)
          Initializes the Expression with a value.
 
Method Summary
 java.lang.Object getValue()
          Gets the value of the Expression.
 boolean isEqual(Expression expression)
          Tests if this Expression is equal to the given Expression.
 
Methods inherited from class wugle.expression.AbstractExpression
clone, getParent, getSymbol, setParent, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wugle.expression.Expression
clone, getParent, getSymbol, setParent
 

Constructor Detail

AbstractValue

public AbstractValue(java.lang.Object value,
                     ExpressionOperation operation)
Initializes the Expression with a value.

Parameters:
value - Value of the Expression
operation - Object for delegating operations to
Method Detail

isEqual

public boolean isEqual(Expression expression)
Description copied from interface: Expression
Tests if this Expression is equal to the given Expression.

Specified by:
isEqual in interface Expression
Parameters:
expression - Expression to compare to
Returns:
true if they are equal

getValue

public java.lang.Object getValue()
Description copied from interface: Value
Gets the value of the Expression.

Specified by:
getValue in interface Value
Returns:
The value