fr.expression4j.sample.custom.element
Class OperatorPlusStringReal

java.lang.Object
  extended by fr.expression4j.sample.custom.element.OperatorPlusStringReal
All Implemented Interfaces:
OperatorImpl

public class OperatorPlusStringReal
extends java.lang.Object
implements OperatorImpl

implement plus operation between a string and a real.

Author:
SGINER

Constructor Summary
OperatorPlusStringReal()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorPlusStringReal

public OperatorPlusStringReal()
Method Detail

compute

public MathematicalElement compute(MathematicalElement leftElement,
                                   MathematicalElement rightElement)
                            throws EvalException
Description copied from interface: OperatorImpl
Set the operator to the given element.

Specified by:
compute in interface OperatorImpl
Parameters:
leftElement - left element for operator.
rightElement - right element for operator.
Returns:
result.
Throws:
EvalException

getLeftOperandeType

public int getLeftOperandeType()
Description copied from interface: OperatorImpl
Get the left operande managed by this operator implementation.

Specified by:
getLeftOperandeType in interface OperatorImpl
Returns:
the left operande type of the operator.

getOperatorName

public java.lang.String getOperatorName()
Description copied from interface: OperatorImpl
Get the operator name associated to this operator implementation.

Specified by:
getOperatorName in interface OperatorImpl
Returns:
the operator name associated to this operator implementation.

getRightOperandeType

public int getRightOperandeType()
Description copied from interface: OperatorImpl
Get the right operande managed by this operator implementation.

Specified by:
getRightOperandeType in interface OperatorImpl
Returns:
the right operande type of the operator.

isUnaryOperator

public boolean isUnaryOperator()
Description copied from interface: OperatorImpl
Tell if operator is an unary or bynary operator.

Specified by:
isUnaryOperator in interface OperatorImpl
Returns:
true if operator is unary.