|
||||||||||
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.MathExpressionImpl
public abstract class MathExpressionImpl
Holds a mathematical relationship between two expressions. Note that the sub expressions must be math expressions. In other words, they must be a math literal, another math expression, or a feature attribute with a declared math type. You may create math expressions of arbitrary complexity by nesting other math expressions as sub expressions in one or more math expressions. This filter defines left and right values to clarify the sub expression precedence for non-associative operations, such as subtraction and division. For example, the left value is the numerator and the right is the denominator in an ExpressionMath division operation.
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 |
MathExpressionImpl()
No argument constructor. |
protected |
MathExpressionImpl(org.opengis.filter.expression.Expression e1,
org.opengis.filter.expression.Expression e2)
|
Method Summary | |
---|---|
void |
addLeftValue(Expression leftValue)
Deprecated. use setExpression1(org.opengis.filter.expression.Expression) |
void |
addRightValue(Expression rightValue)
Deprecated. use setExpression2(org.opengis.filter.expression.Expression) |
protected void |
ensureOperandsSet()
Convenience method which ensures that both expressions have been set. |
org.opengis.filter.expression.Expression |
getExpression1()
Gets the left or first expression. |
org.opengis.filter.expression.Expression |
getExpression2()
Gets the second expression. |
Expression |
getLeftValue()
Deprecated. use getExpression1() . |
Expression |
getRightValue()
Deprecated. use getExpression2() . |
short |
getType()
Gets the type of this expression. |
protected java.lang.Object |
number(double number)
|
void |
setExpression1(org.opengis.filter.expression.Expression expression)
Gets the left or first expression. |
void |
setExpression2(org.opengis.filter.expression.Expression expression)
Gets the second expression. |
Methods inherited from class org.geotools.filter.DefaultExpression |
---|
accept, evaluate, evaluate, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract |
---|
eval, eval, evaluate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.filter.MathExpression |
---|
getValue |
Methods inherited from interface org.geotools.filter.Expression |
---|
accept, evaluate |
Methods inherited from interface org.opengis.filter.expression.Expression |
---|
accept, evaluate, evaluate |
Constructor Detail |
---|
protected MathExpressionImpl()
protected MathExpressionImpl(org.opengis.filter.expression.Expression e1, org.opengis.filter.expression.Expression e2)
Method Detail |
---|
public final void addLeftValue(Expression leftValue) throws IllegalFilterException
setExpression1(org.opengis.filter.expression.Expression)
addLeftValue
in interface MathExpression
leftValue
- Expression to add to this expression.
IllegalFilterException
- Attempting to add non-math expression.public final void addRightValue(Expression rightValue) throws IllegalFilterException
setExpression2(org.opengis.filter.expression.Expression)
addRightValue
in interface MathExpression
rightValue
- Expression to add to this expression.
IllegalFilterException
- Attempting to add non-math expression.public final Expression getLeftValue()
getExpression1()
.
getLeftValue
in interface MathExpression
public org.opengis.filter.expression.Expression getExpression1()
getExpression1
in interface org.opengis.filter.expression.BinaryExpression
public void setExpression1(org.opengis.filter.expression.Expression expression)
IllegalFilterException
public final Expression getRightValue()
getExpression2()
.
getRightValue
in interface MathExpression
public org.opengis.filter.expression.Expression getExpression2()
getExpression2
in interface org.opengis.filter.expression.BinaryExpression
public void setExpression2(org.opengis.filter.expression.Expression expression)
IllegalFilterException
public short getType()
getType
in interface MathExpression
getType
in class DefaultExpression
protected void ensureOperandsSet() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected java.lang.Object number(double number)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |