fr.expression4j.basic
Interface OperatorImpl

All Known Implementing Classes:
OperatorDivideComplexComplex, OperatorDivideRealComplex, OperatorDivideRealReal, OperatorMinusComplexComplex, OperatorMinusRealComplex, OperatorMinusRealReal, OperatorMultiplyComplexComplex, OperatorMultiplyRealComplex, OperatorMultiplyRealReal, OperatorPlusComplexComplex, OperatorPlusRealComplex, OperatorPlusRealReal, OperatorPlusStringReal, OperatorPlusStringString, OperatorPowRealReal, OperatorSupRealReal, OperatorUnaryMinusComplex, OperatorUnaryMinusReal, OperatorUnaryPlusComplex, OperatorUnaryPlusReal

public interface OperatorImpl


Method Summary
 MathematicalElement compute(MathematicalElement leftElement, MathematicalElement rightElement)
          Set the operator to the given element.
 int getLeftOperandeType()
          Get the left operande managed by this operator implementation.
 java.lang.String getOperatorName()
          Get the operator name associated to this operator implementation.
 int getRightOperandeType()
          Get the right operande managed by this operator implementation.
 boolean isUnaryOperator()
          Tell if operator is an unary or bynary operator.
 

Method Detail

isUnaryOperator

boolean isUnaryOperator()
Tell if operator is an unary or bynary operator.

Returns:
true if operator is unary.

getLeftOperandeType

int getLeftOperandeType()
Get the left operande managed by this operator implementation.

Returns:
the left operande type of the operator.

getRightOperandeType

int getRightOperandeType()
Get the right operande managed by this operator implementation.

Returns:
the right operande type of the operator.

getOperatorName

java.lang.String getOperatorName()
Get the operator name associated to this operator implementation.

Returns:
the operator name associated to this operator implementation.

compute

MathematicalElement compute(MathematicalElement leftElement,
                            MathematicalElement rightElement)
                            throws EvalException
Set the operator to the given element.

Parameters:
leftElement - left element for operator.
rightElement - right element for operator.
Returns:
result.
Throws:
EvalException