Package org.apache.sis.filter
Class ArithmeticFunction.Multiply<R>
java.lang.Object
org.apache.sis.internal.filter.Node
org.apache.sis.filter.BinaryFunction<R,Number,Number>
org.apache.sis.filter.ArithmeticFunction<R>
org.apache.sis.filter.ArithmeticFunction.Multiply<R>
- Type Parameters:
R- the type of resources used as inputs.
- All Implemented Interfaces:
Serializable,Function<R,,Number> Expression<R,,Number> Optimization.OnExpression<R,,Number> FeatureExpression<R,Number>
- Enclosing class:
- ArithmeticFunction<R>
The "Multiply" (×) expression.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.filter.ArithmeticFunction
ArithmeticFunction.Add<R>, ArithmeticFunction.Divide<R>, ArithmeticFunction.Multiply<R>, ArithmeticFunction.Subtract<R> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.opengis.util.ScopedNameIdentification of the"Multiply"operation.private static final longFor cross-version compatibility during (de)serialization.private static final DefaultAttributeType<Number>Description of results of the"Multiply"expression.Fields inherited from class org.apache.sis.filter.BinaryFunction
expression1, expression2 -
Constructor Summary
ConstructorsConstructorDescriptionMultiply(Expression<? super R, ? extends Number> expression1, Expression<? super R, ? extends Number> expression2) Creates a new expression for the"Multiply"operation. -
Method Summary
Modifier and TypeMethodDescriptionprotected NumberapplyAsDecimal(BigDecimal left, BigDecimal right) Calculates this function using given operands ofBigDecimaltype.protected NumberapplyAsDouble(double left, double right) Applies this expression to the given operands.protected NumberapplyAsFraction(Fraction left, Fraction right) Calculates this function using given operands ofFractiontype.protected NumberapplyAsInteger(BigInteger left, BigInteger right) Calculates this function using given operands ofBigIntegertype.protected NumberapplyAsLong(long left, long right) Calculates this function using given operands oflongprimitive type.protected DefaultAttributeType<Number>Returns the type of results computed by this arithmetic function.org.opengis.util.ScopedNameReturns the name of the function to be called.recreate(Expression<? super R, ?>[] effective) Creates a new expression of the same type but different parameters.protected charsymbol()Returns the mathematical symbol for this binary function.Methods inherited from class org.apache.sis.filter.ArithmeticFunction
apply, createNumericType, expectedType, getValueClass, toValueTypeMethods inherited from class org.apache.sis.filter.BinaryFunction
apply, getChildren, getExpressions, getParametersMethods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, toGeometryWrapper, toString, unwrap, warningMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sis.filter.Expression
getParametersMethods inherited from interface org.apache.sis.filter.Optimization.OnExpression
optimize
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility during (de)serialization.- See Also:
-
TYPE
Description of results of the"Multiply"expression. -
NAME
private static final org.opengis.util.ScopedName NAMEIdentification of the"Multiply"operation.
-
-
Constructor Details
-
Multiply
Multiply(Expression<? super R, ? extends Number> expression1, Expression<? super R, ? extends Number> expression2) Creates a new expression for the"Multiply"operation.
-
-
Method Details
-
expectedType
Description copied from class:ArithmeticFunctionReturns the type of results computed by this arithmetic function.- Specified by:
expectedTypein classArithmeticFunction<R>
-
recreate
Creates a new expression of the same type but different parameters.- Parameters:
effective- the expressions to use as a replacement of this expression parameters.- Returns:
- the new expression, or
thisif unsupported.
-
getFunctionName
public org.opengis.util.ScopedName getFunctionName()Description copied from interface:ExpressionReturns the name of the function to be called.- Returns:
- name of the function to be called.
-
symbol
protected char symbol()Description copied from class:NodeReturns the mathematical symbol for this binary function. For comparison operators, the symbol should be one of < > ≤ ≥ = ≠. For arithmetic operators, the symbol should be one of + − × ÷. -
applyAsDouble
Applies this expression to the given operands.- Overrides:
applyAsDoublein classBinaryFunction<R,Number, Number>
-
applyAsFraction
Description copied from class:BinaryFunctionCalculates this function using given operands ofFractiontype. If this function is a filter, then this method should returns anIntegervalue 0 or 1 for false or true respectively. Otherwise the result is usually aFraction. This method may returnnullif the operation cannot apply on numbers.- Overrides:
applyAsFractionin classBinaryFunction<R,Number, Number>
-
applyAsDecimal
Description copied from class:BinaryFunctionCalculates this function using given operands ofBigDecimaltype. If this function is a filter, then this method should returns anIntegervalue 0 or 1 for false or true respectively. Otherwise the result is usually aBigDecimal. This method may returnnullif the operation cannot apply on numbers.- Overrides:
applyAsDecimalin classBinaryFunction<R,Number, Number>
-
applyAsInteger
Description copied from class:BinaryFunctionCalculates this function using given operands ofBigIntegertype. If this function is a filter, then this method should returns anIntegervalue 0 or 1 for false or true respectively. Otherwise the result is usually aBigInteger, except for division which may produce other types. This method may returnnullif the operation cannot apply on numbers.- Overrides:
applyAsIntegerin classBinaryFunction<R,Number, Number>
-
applyAsLong
Description copied from class:BinaryFunctionCalculates this function using given operands oflongprimitive type. If this function is a filter, then this method should returns anIntegervalue 0 or 1 for false or true respectively. Otherwise the result is usually aLong, except for division which may produce other types. This method may returnnullif the operation cannot apply on numbers.- Overrides:
applyAsLongin classBinaryFunction<R,Number, Number>
-