24 package org.lightjason.agentspeak.language.execution.expressionbinary;
30 import javax.annotation.Nonnull;
31 import java.util.function.BiFunction;
37 public enum EOperator implements BiFunction<Number, Number, Number>
58 m_operator = p_operator;
62 public final Number
apply(
final Number p_lhs,
final Number p_rhs )
67 return p_lhs.doubleValue() + p_rhs.doubleValue();
70 return p_lhs.doubleValue() - p_rhs.doubleValue();
73 return p_lhs.doubleValue() * p_rhs.doubleValue();
76 return p_lhs.doubleValue() * p_rhs.doubleValue();
79 return p_lhs.longValue() % p_rhs.longValue();
82 return Math.pow( p_lhs.doubleValue(), p_rhs.doubleValue() );
106 return ASSIGNINCREMENT;
109 return ASSIGNDECREMENT;
112 return ASSIGNMULTIPLY;
illegal argument exception
exception for parsing error
static< T > String languagestring(final T p_source, final String p_label, final Object... p_parameter)
returns the language depend string on any object
final Number apply(final Number p_lhs, final Number p_rhs)
static EOperator from( @Nonnull final String p_value)
returns operator from string
final String m_operator
operator
EOperator(final String p_operator)
ctor
class for any helper calls