org.opengis.filter.expression
Class NilExpression

Object
  extended by NilExpression
All Implemented Interfaces:
Serializable, Expression

public final class NilExpression
extends Object
implements Expression, Serializable

Placeholder class used to represent a NIL expression, evaultates to null.

This placeholder class is 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

Field Summary
 
Fields inherited from interface Expression
NIL
 
Method Summary
 Object accept(ExpressionVisitor visitor, Object extraData)
          Accepts a visitor.
 boolean equals(Object other)
          Equals is defined only against Expression.NIL.
 Object evaluate(Object object)
          Returns null
<T> T
evaluate(Object object, Class<T> context)
          Returns null
 int hashCode()
          Returns 0 in order to agree with hashcode of null.
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

accept

public Object accept(ExpressionVisitor visitor,
                     Object extraData)
Description copied from interface: Expression
Accepts a visitor. Subclasses must implement with a method whose content is the following:
return visitor.visit(this, extraData);

Specified by:
accept in interface Expression

evaluate

public Object evaluate(Object object)
Returns null

Specified by:
evaluate in interface Expression

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:
Evaluates the given expression based on the content of the given object an an instance of context.

equals

public boolean equals(Object other)
Equals is defined only against Expression.NIL.

Overrides:
equals in class Object
Parameters:
other -
Returns:
true for Expression.NIL

hashCode

public int hashCode()
Returns 0 in order to agree with hashcode of null.

Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.