org.objectweb.medor.expression.api
Interface BinaryArithmeticOperator

All Superinterfaces:
BinaryOperator, org.objectweb.medor.clone.api.Cloneable, java.lang.Cloneable, Expression, Operator, java.io.Serializable
All Known Implementing Classes:
BasicBinaryArithmeticOperator

public interface BinaryArithmeticOperator
extends BinaryOperator

This interface represents a binary arithmetic operation (+, -, ...).

It gives methods for a binary evaluation with all valid cases. These binary evaluate methods are called by the generic evaluate(ParameterOperand[], Object) method, depending on the types of the left and right Operands.

Author:
Sebastien Chassande-Barrioz

Field Summary
 
Fields inherited from interface org.objectweb.medor.expression.api.Operator
ABS, AND, AVG, BITWIZE, CONCAT, CONDAND, CONDOR, COUNT, DIV, EQUAL, FIRSTLOCATE, GREATER, GREATEREQUAL, IN, INDEXEDLOCATE, LENGTH, LOWER, LOWEREQUAL, MAX, MEMBEROF, MIN, MINUS, MOD, MULT, NAV, NOT, NOTEQUAL, NOTMEMBEROF, OR, PLUS, SQRT, STRING_LOWER, STRING_UPPER, SUBSTRING, SUM, UMINUS
 
Method Summary
 int evaluate(char op1, char op2)
          This fonction evaluate the comaparison between two characters variable;
 java.lang.String evaluate(char op1, java.lang.String op2)
          This fonction evaluate the comaparison between two characters variable;
 java.util.Date evaluate(java.util.Date op1, java.util.Date op2)
          This fonction evaluate the comaparison between two java.util.Date variable;
 double evaluate(double op1, double op2)
          This fonction evaluate the comaparison between two double variable;
 double evaluate(double op1, float op2)
          This fonction evaluate the comaparison between two numerics variables;
 double evaluate(double op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 double evaluate(double op1, long op2)
          This fonction evaluate the comaparison between two numerics variables;
 double evaluate(double op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 double evaluate(float op1, double op2)
          This fonction evaluate the comaparison between two numerics variables;
 float evaluate(float op1, float op2)
          This fonction evaluate the comaparison between two floats variables;
 float evaluate(float op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 float evaluate(float op1, long op2)
          This fonction evaluate the comaparison between two numerics variables;
 float evaluate(float op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 double evaluate(int op1, double op2)
          This fonction evaluate the comaparison between two numerics variables;
 float evaluate(int op1, float op2)
          This fonction evaluate the comaparison between two numerics variables;
 int evaluate(int op1, int op2)
          This fonction evaluate the arithmetic operation between two numerics variables;
 long evaluate(int op1, long op2)
          This fonction evaluate the comaparison between two numerics variables;
 int evaluate(int op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 double evaluate(long op1, double op2)
          This fonction evaluate the comaparison between two numerics variables;
 float evaluate(long op1, float op2)
          This fonction evaluate the comaparison between two numerics variables;
 long evaluate(long op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 long evaluate(long op1, long op2)
          This fonction evaluate the comaparison between two long variable;
 long evaluate(long op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 java.lang.String evaluate(java.lang.String op1, char op2)
          This fonction evaluate the comaparison between two string variable;
 java.lang.String evaluate(java.lang.String op1, java.lang.String op2)
          This fonction evaluate the comaparison between two string variable;
 
Methods inherited from interface org.objectweb.medor.expression.api.BinaryOperator
getLeftExpression, getRightExpression, setLeftExpression, setRightExpression
 
Methods inherited from interface org.objectweb.medor.expression.api.Operator
getExpression, getOperandNumber, getOperatorString, setExpression
 
Methods inherited from interface org.objectweb.medor.expression.api.Expression
compileExpression, evaluate, getType
 
Methods inherited from interface org.objectweb.medor.clone.api.Cloneable
clone
 

Method Detail

evaluate

public int evaluate(int op1,
                    int op2)
This fonction evaluate the arithmetic operation between two numerics variables;

Parameters:
op1 - integer
op2 - integer
Returns:
an integer result

evaluate

public int evaluate(int op1,
                    short op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - int
op2 - short
Returns:
an int as in Java programming language

evaluate

public long evaluate(int op1,
                     long op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - int
op2 - long
Returns:
a long result as in Java programming language

evaluate

public float evaluate(int op1,
                      float op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - int
op2 - float
Returns:
a float result as in Java programming language

evaluate

public double evaluate(int op1,
                       double op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - int
op2 - double
Returns:
a double as in Java programming language

evaluate

public float evaluate(float op1,
                      float op2)
This fonction evaluate the comaparison between two floats variables;

Parameters:
op1 - float
op2 - float
Returns:
a float resultas in Java programming language

evaluate

public float evaluate(float op1,
                      short op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - float
op2 - short
Returns:
a float result as in Java programming language

evaluate

public float evaluate(float op1,
                      int op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - float
op2 - int
Returns:
a float result as in Java programming language

evaluate

public float evaluate(float op1,
                      long op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - float
op2 - long
Returns:
a float result as in Java programming language

evaluate

public double evaluate(float op1,
                       double op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - float
op2 - double
Returns:
a double result as in Java programming language

evaluate

public int evaluate(char op1,
                    char op2)
             throws TypingException
This fonction evaluate the comaparison between two characters variable;

Parameters:
op1 - character
op2 - character
Returns:
an int value
Throws:
TypingException

evaluate

public java.lang.String evaluate(char op1,
                                 java.lang.String op2)
                          throws TypingException
This fonction evaluate the comaparison between two characters variable;

Parameters:
op1 - char
op2 - string
Returns:
a string value
Throws:
TypingException - if this operation is not supported

evaluate

public long evaluate(long op1,
                     long op2)
This fonction evaluate the comaparison between two long variable;

Parameters:
op1 - long
op2 - long
Returns:
a long result as in Java programming language

evaluate

public long evaluate(long op1,
                     short op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - long
op2 - short
Returns:
a long result as in Java programming language

evaluate

public long evaluate(long op1,
                     int op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - long
op2 - int
Returns:
a long result as in Java programming language

evaluate

public float evaluate(long op1,
                      float op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - long
op2 - float
Returns:
a float result as in Java programming language

evaluate

public double evaluate(long op1,
                       double op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - long
op2 - double
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       double op2)
This fonction evaluate the comaparison between two double variable;

Parameters:
op1 - double
op2 - double
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       short op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - double
op2 - short
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       int op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - double
op2 - int
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       float op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - double
op2 - float
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       long op2)
This fonction evaluate the comaparison between two numerics variables;

Parameters:
op1 - double
op2 - long
Returns:
a double result as in Java programming language

evaluate

public java.lang.String evaluate(java.lang.String op1,
                                 java.lang.String op2)
                          throws TypingException
This fonction evaluate the comaparison between two string variable;

Parameters:
op1 - String
op2 - String
Returns:
a string value as in java programming language
Throws:
TypingException - if this operation is not supported

evaluate

public java.lang.String evaluate(java.lang.String op1,
                                 char op2)
                          throws TypingException
This fonction evaluate the comaparison between two string variable;

Parameters:
op1 - String
op2 - char
Returns:
a string value as in java programming language
Throws:
TypingException - if this operation is not supported

evaluate

public java.util.Date evaluate(java.util.Date op1,
                               java.util.Date op2)
                        throws TypingException
This fonction evaluate the comaparison between two java.util.Date variable;

Parameters:
op1 - Date
op2 - Date
Returns:
a Date value as in java programming language
Throws:
TypingException - if this operation is not supported