|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNilExpression
public final class NilExpression
Placeholder class used to represent a NIL expression, evaluates to null
.
This placeholder class allows data structures to avoid the use of null
.
Please note that Expression.NIL
is not considered a Literal with value
null
(since the literal may have its value changed).
Field Summary |
---|
Fields inherited from interface Expression |
---|
NIL |
Method Summary | ||
---|---|---|
Object |
accept(ExpressionVisitor visitor,
Object extraData)
Accepts a visitor. |
|
Object |
evaluate(Object object)
Returns null . |
|
|
evaluate(Object object,
Class<T> context)
Returns null . |
|
String |
toString()
Returns a string representation of this expression. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Object accept(ExpressionVisitor visitor, Object extraData)
accept
in interface Expression
public Object evaluate(Object object)
null
.
evaluate
in interface Expression
public <T> T evaluate(Object object, Class<T> context)
null
.
evaluate
in interface Expression
T
- The type of the returned object.object
- The object to evaluate the expression against.context
- The type of the resulting value of the expression.
context
.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |