org.geotools.filter
Interface LiteralExpression

All Superinterfaces:
Expression, ExpressionType
All Known Subinterfaces:
BBoxExpression
All Known Implementing Classes:
BBoxExpressionImpl, ConstantExpression, LiteralExpressionImpl

public interface LiteralExpression
extends Expression

Defines an expression that holds a literal for return.

Version:
$Id: LiteralExpression.java 17702 2006-01-23 00:08:55Z desruisseaux $
Author:
Rob Hranac, Vision for New York, Chris Holmes, TOPP

Field Summary
 
Fields inherited from interface org.geotools.filter.ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Method Summary
 java.lang.Object getLiteral()
          Retrieves the literal of this expression.
 short getType()
          Returns the literal type.
 java.lang.Object getValue(Feature feature)
          Gets the value of this literal.
 void setLiteral(java.lang.Object literal)
          Sets the literal.
 
Methods inherited from interface org.geotools.filter.Expression
accept
 

Method Detail

setLiteral

public void setLiteral(java.lang.Object literal)
                throws IllegalFilterException
Sets the literal.

Parameters:
literal - The literal to store inside this expression.
Throws:
IllegalFilterException - This literal type is not in scope.

getValue

public java.lang.Object getValue(Feature feature)
Gets the value of this literal.

Specified by:
getValue in interface Expression
Parameters:
feature - Required by the interface but not used.
Returns:
the literal held by this expression. Ignores the passed in feature.

getType

public short getType()
Returns the literal type.

Specified by:
getType in interface Expression
Returns:
the short representation of the literal expression type.

getLiteral

public java.lang.Object getLiteral()
Retrieves the literal of this expression.

Returns:
the literal held by this expression.


Copyright © GeoTools. All Rights Reserved.