Package com.luciad.ogc.filter.model
Class TLcdOGCBinaryOperator
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.filter.model.TLcdOGCBinaryOperator
- All Implemented Interfaces:
ILcdDataObject
,ILcdGenericExpression
,ILcdOGCExpression
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
This class represents the elements of type
<ogc:BinaryOperatorType>
.
Namely:
<ogc:Add>
<ogc:Mul>
<ogc:Sub>
<ogc:Div>
TLcdOGCBinaryOperator
instance is composed of an arithmetic operation type that must be one of the
constants defined in this class, and two operands that can be any instances of ILcdOGCExpression
.
Note that the OGC Filter 2.0 standard no longer includes the binary operators.
You will get an IllegalArgumentException
when you use this operator in OGC Filter 2.0 XML (for example WFS 2.0).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Arithmetic operation type that corresponds to the<ogc:Add>
element.static final int
Arithmetic operation type that corresponds to the<ogc:Div>
element.static final int
Arithmetic operation type that corresponds to the<ogc:Mul>
element.static final int
Arithmetic operation type that corresponds to the<ogc:Sub>
element. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TLcdOGCBinaryOperator
(int aType) Creates an instance with a given arithmetic operation type.TLcdOGCBinaryOperator
(int aType, ILcdOGCExpression aFirstExpression, ILcdOGCExpression aSecondExpression) Creates an instance with a given arithmetic operation type and its 2 operands. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the first operand of the arithmetic operation.Gets the second operand of the arithmetic operation.int
getType()
Gets the arithmetic operation type.int
hashCode()
void
setFirstExpression
(ILcdOGCExpression aFirstExpression) Sets the first operand of the arithmetic operation.void
setSecondExpression
(ILcdOGCExpression aSecondExpression) Sets the second operand of the arithmetic operation.void
setType
(int aType) Sets the arithmetic operation type.toString()
Methods inherited from class com.luciad.datamodel.TLcdDataObject
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
-
Field Details
-
ADD
public static final int ADDArithmetic operation type that corresponds to the<ogc:Add>
element.- See Also:
-
SUBSTRACT
public static final int SUBSTRACTArithmetic operation type that corresponds to the<ogc:Sub>
element.- See Also:
-
MULTIPLY
public static final int MULTIPLYArithmetic operation type that corresponds to the<ogc:Mul>
element.- See Also:
-
DIVIDE
public static final int DIVIDEArithmetic operation type that corresponds to the<ogc:Div>
element.- See Also:
-
-
Constructor Details
-
TLcdOGCBinaryOperator
public TLcdOGCBinaryOperator()Default constructor. -
TLcdOGCBinaryOperator
public TLcdOGCBinaryOperator(int aType) Creates an instance with a given arithmetic operation type.- Parameters:
aType
- arithmetic operation type of the instance. The type must be one of the constants defined in this class.
-
TLcdOGCBinaryOperator
public TLcdOGCBinaryOperator(int aType, ILcdOGCExpression aFirstExpression, ILcdOGCExpression aSecondExpression) Creates an instance with a given arithmetic operation type and its 2 operands.- Parameters:
aType
- arithmetic operation type of the instance. The type must be one of the constants defined in this class.aFirstExpression
- the first operand.aSecondExpression
- the second operand.
-
-
Method Details
-
getFirstExpression
Gets the first operand of the arithmetic operation.- Returns:
- the first operand of the arithmetic operation.
-
setFirstExpression
Sets the first operand of the arithmetic operation.- Parameters:
aFirstExpression
- the first operand of the arithmetic operation.
-
getSecondExpression
Gets the second operand of the arithmetic operation.- Returns:
- the second operand of the arithmetic operation.
-
setSecondExpression
Sets the second operand of the arithmetic operation.- Parameters:
aSecondExpression
- the second operand of the arithmetic operation.
-
getType
public int getType()Gets the arithmetic operation type.- Returns:
- the arithmetic operation type. The type will be one of the constants defined in this class.
-
setType
public void setType(int aType) Sets the arithmetic operation type.- Parameters:
aType
- the arithmetic operation type. The type must be one of the constants defined in this class.
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classTLcdDataObject
-