|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.expression.ExpressionAbstract
org.geotools.filter.DefaultExpression
org.geotools.filter.LiteralExpressionImpl
public class LiteralExpressionImpl
Defines an expression that holds a literal for return.
Field Summary |
---|
Fields inherited from class org.geotools.filter.DefaultExpression |
---|
expressionType, permissiveConstruction |
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_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT |
Fields inherited from interface org.opengis.filter.expression.Expression |
---|
NIL |
Constructor Summary | |
---|---|
protected |
LiteralExpressionImpl()
Constructor with literal. |
protected |
LiteralExpressionImpl(double value)
Constructor with literal. |
protected |
LiteralExpressionImpl(int value)
Constructor with literal. |
protected |
LiteralExpressionImpl(long value)
|
protected |
LiteralExpressionImpl(java.lang.Object literal)
Constructor with literal. |
protected |
LiteralExpressionImpl(java.lang.String value)
Constructor with literal. |
Method Summary | |
---|---|
java.lang.Object |
accept(org.opengis.filter.expression.ExpressionVisitor visitor,
java.lang.Object extraData)
Used by FilterVisitors to perform some action on this filter instance. |
boolean |
equals(java.lang.Object obj)
Compares this filter to the specified object. |
java.lang.Object |
evaluate(java.lang.Object feature)
This method checks if the object is an instance of Feature and
if so, calls through to #evaluate(Feature) . |
java.lang.Object |
evaluate(java.lang.Object feature,
java.lang.Class context)
Default implementation delegates handling of context conversion to Value utility class. |
java.lang.Object |
evaluate(org.opengis.feature.simple.SimpleFeature feature)
Gets the value of this literal. |
java.lang.Object |
getLiteral()
Deprecated. use getValue() . |
short |
getType()
Returns the literal type. |
java.lang.Object |
getValue()
Retrieves the literal of this expression. |
int |
hashCode()
Override of hashCode method. |
void |
setLiteral(java.lang.Object literal)
Deprecated. use setValue(Object) . |
void |
setValue(java.lang.Object literal)
Sets the literal. |
java.lang.String |
toString()
Return this filter as a string. |
Methods inherited from class org.geotools.filter.DefaultExpression |
---|
accept, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract |
---|
eval, eval |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.filter.LiteralExpression |
---|
getValue |
Methods inherited from interface org.geotools.filter.Expression |
---|
accept |
Constructor Detail |
---|
protected LiteralExpressionImpl()
protected LiteralExpressionImpl(java.lang.Object literal) throws IllegalFilterException
literal
- The literal to store inside this expression.
IllegalFilterException
- This literal type is not in scope.protected LiteralExpressionImpl(int value)
value
- The integer to store inside this expression.protected LiteralExpressionImpl(long value)
protected LiteralExpressionImpl(double value)
value
- The double to store inside this expression.protected LiteralExpressionImpl(java.lang.String value)
value
- The double to store inside this expression.Method Detail |
---|
public short getType()
getType
in interface LiteralExpression
getType
in class DefaultExpression
public final void setLiteral(java.lang.Object literal) throws IllegalFilterException
setValue(Object)
.
setValue(Object)
.
setLiteral
in interface LiteralExpression
literal
- The literal to store inside this expression.
IllegalFilterException
- This literal type is not in scope.public final java.lang.Object getLiteral()
getValue()
.
getValue()
.
getLiteral
in interface LiteralExpression
public java.lang.Object getValue()
getValue
in interface org.opengis.filter.expression.Literal
public final void setValue(java.lang.Object literal)
literal
- The literal to store inside this expression.
IllegalFilterException
- This literal type is not in scope.public java.lang.Object evaluate(org.opengis.feature.simple.SimpleFeature feature) throws java.lang.IllegalArgumentException
evaluate
in class DefaultExpression
feature
- Required by the interface but not used.
java.lang.IllegalArgumentException
- Feature does not match declared schema.public java.lang.Object evaluate(java.lang.Object feature)
DefaultExpression
Feature
and
if so, calls through to #evaluate(Feature)
. This is done
to maintain backwards compatability with previous version of Expression api
which depended on Feature. If the object is not an instance of feature
the super implementation is called.
evaluate
in interface org.opengis.filter.expression.Expression
evaluate
in class DefaultExpression
public java.lang.Object evaluate(java.lang.Object feature, java.lang.Class context)
ExpressionAbstract
Subclasses are expected to make use of the Value utility class (as the easiest way to provide value morphing in confirmance with the Filter specification).
evaluate
in interface org.opengis.filter.expression.Expression
evaluate
in class ExpressionAbstract
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- - the object to compare this ExpressionLiteral against.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
accept
in interface org.opengis.filter.expression.Expression
visitor
- The visitor which requires access to this filter, the
method must call visitor.visit(this);
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |