24 package org.lightjason.agentspeak.language.execution.expression.numerical;
37 import javax.annotation.Nonnull;
38 import java.util.LinkedList;
39 import java.util.List;
62 super( p_operator, p_lefthandside, p_righthandside );
70 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
72 final List<ITerm> l_argument =
new LinkedList<>();
80 l_argument.get( 0 ).<Number>raw(),
81 l_argument.get( 1 ).<Number>raw()
87 l_argument.get( 0 ).<Number>raw(),
88 l_argument.get( 1 ).<Number>raw()
94 l_argument.get( 0 ).<Number>raw(),
95 l_argument.get( 1 ).<Number>raw()
116 private <N extends Number, M extends Number> Number
multiply( @Nonnull
final N p_left, @Nonnull
final M p_right )
118 return p_left.doubleValue() * p_right.doubleValue();
132 private <N extends Number, M extends Number> Number
divide( @Nonnull
final N p_left, @Nonnull
final M p_right )
134 return p_left.doubleValue() / p_right.doubleValue();
148 private <N extends Number, M extends Number> Number
modulo( @Nonnull
final N p_left, @Nonnull
final M p_right )
150 return p_left.longValue() % p_right.longValue();
final IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
illegal argument exception
CMultiplicative( @Nonnull final EOperator p_operator, @Nonnull final IExpression p_lefthandside, @Nonnull final IExpression p_righthandside)
ctor
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
multiplicative binary expression
private< N extends Number, M extends Number > Number multiply( @Nonnull final N p_left, @Nonnull final M p_right)
runs the multiply of number types
static< T > String languagestring(final T p_source, final String p_label, final Object... p_parameter)
returns the language depend string on any object
execution context with local data
final boolean isMultiplicative()
check of a multiplicative operator
final EOperator m_operator
expression operator
result for an immutable fuzzy value
static final long serialVersionUID
serial id
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
class for any helper calls
private< N extends Number, M extends Number > Number divide( @Nonnull final N p_left, @Nonnull final M p_right)
runs the divide of number types
private< N extends Number, M extends Number > Number modulo( @Nonnull final N p_left, @Nonnull final M p_right)
runs the modulo of number types
final boolean executearguments(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument)
execute expression arguments
term structure for simple datatypes