|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.rode.thesis.interpreter.AbstractExpression<E>
E
- The type of value the evaluation of this expression
produces.public abstract class AbstractExpression<E>
An abstract expression represents the basic
traits of any expression
.
An abstract expression is stateless.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface dk.rode.thesis.interpreter.Expression |
---|
Expression.SymbolIdiom |
Constructor Summary | |
---|---|
protected |
AbstractExpression()
No-arg sub-class constructor. |
Method Summary | |
---|---|
boolean |
contains(Expression<?> expression)
Returns true if this expression is or contains the expression supplied as expression , false if not. |
boolean |
equals(Object object)
Returns true if object is an instance of this
expression type having the same name
and all operands are
equal using equals(Object) , respectively,
false otherwise. |
int |
hashCode()
Returns the hash code of this expression. |
String |
toString()
Returns the string representation of this expression. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface dk.rode.thesis.interpreter.Expression |
---|
asSymbol, copy, evaluate, name, operands |
Constructor Detail |
---|
protected AbstractExpression()
Method Detail |
---|
public boolean contains(Expression<?> expression)
Expression
expression
, false if not. The test is performed using identity (==).
Unlike Expression.asSymbol(Context)
, querying for containment
cannot handle cyclic expression references!
contains
in interface Expression<E>
expression
- The expression to test; cannot be null.
expression
is this expression or
contained within this expression, false if not.Expression.asSymbol(Context)
,
Context.touch(Expression)
public boolean equals(Object object)
object
is an instance of this
expression type having the same name
and all operands
are
equal using equals(Object)
, respectively,
false otherwise.
equals
in class Object
object
- The object to test; can be null.
public int hashCode()
hashCode
in class Object
public String toString()
toString
in interface Expression<E>
toString
in class Object
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |