|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExpressionAbstract
DefaultExpression
LiteralExpressionImpl
public class LiteralExpressionImpl
Defines an expression that holds a literal for return.
Field Summary |
---|
Fields inherited from class DefaultExpression |
---|
expressionType, permissiveConstruction |
Fields inherited from interface 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 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(Object literal)
Constructor with literal. |
protected |
LiteralExpressionImpl(String value)
Constructor with literal. |
Method Summary | |
---|---|
Object |
accept(ExpressionVisitor visitor,
Object extraData)
Used by FilterVisitors to perform some action on this filter instance. |
boolean |
equals(Object obj)
Compares this filter to the specified object. |
Object |
evaluate(Object feature)
This method checks if the object is an instance of Feature and
if so, calls through to #evaluate(Feature) . |
Object |
evaluate(Object feature,
Class context)
Default implementation delegates handling of context conversion to Value utility class. |
Object |
evaluate(SimpleFeature feature)
Gets the value of this literal. |
Object |
getLiteral()
Deprecated. use getValue() . |
short |
getType()
Returns the literal type. |
Object |
getValue()
Retrieves the literal of this expression. |
int |
hashCode()
Override of hashCode method. |
void |
setLiteral(Object literal)
Deprecated. use setValue(Object) . |
void |
setValue(Object literal)
Sets the literal. |
String |
toString()
Return this filter as a string. |
Methods inherited from class DefaultExpression |
---|
accept, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class ExpressionAbstract |
---|
eval, eval |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface LiteralExpression |
---|
getValue |
Methods inherited from interface Expression |
---|
accept |
Constructor Detail |
---|
protected LiteralExpressionImpl()
protected LiteralExpressionImpl(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(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(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 Object getLiteral()
getValue()
.
getValue()
.
getLiteral
in interface LiteralExpression
public Object getValue()
getValue
in interface Literal
public final void setValue(Object literal)
literal
- The literal to store inside this expression.
IllegalFilterException
- This literal type is not in scope.public Object evaluate(SimpleFeature feature) throws IllegalArgumentException
evaluate
in class DefaultExpression
feature
- Required by the interface but not used.
IllegalArgumentException
- Feature does not match declared schema.public Object evaluate(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 Expression
evaluate
in class DefaultExpression
public Object evaluate(Object feature, 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 Expression
evaluate
in class ExpressionAbstract
feature
- 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
public boolean equals(Object obj)
equals
in class Object
obj
- - the object to compare this ExpressionLiteral against.
public int hashCode()
hashCode
in class Object
public Object accept(ExpressionVisitor visitor, Object extraData)
accept
in interface 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 |