Class NilExpression

  • All Implemented Interfaces:
    Serializable, Expression

    public final class NilExpression
    extends Object
    implements Expression, Serializable
    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).
    See Also:
    Serialized Form
    • Method Detail

      • evaluate

        public <T> T evaluate​(Object object,
                              Class<T> context)
        Returns null.
        Specified by:
        evaluate in interface Expression
        Type Parameters:
        T - the type of the returned object.
        Parameters:
        object - the object to evaluate the expression against.
        context - the type of the resulting value of the expression.
        Returns:
        the expression based on the content of the given object an an instance of context.
      • toString

        public String toString()
        Returns a string representation of this expression.
        Overrides:
        toString in class Object