fr.expression4j.sample.custom.element
Class OperatorPlusStringString

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

public class OperatorPlusStringString
extends java.lang.Object
implements OperatorImpl

implement plus operation between a string and a string.

Author:
SGINER

Constructor Summary
OperatorPlusStringString()
           
 
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

OperatorPlusStringString

public OperatorPlusStringString()
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.