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
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractValue
public AbstractValue(java.lang.Object value,
ExpressionOperation operation)
- Initializes the Expression with a value.
- Parameters:
value
- Value of the Expressionoperation
- Object for delegating operations to
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