org.objectweb.medor.expression.api

Interface BinaryArithmeticOperator

All Superinterfaces:
BinaryOperator, org.objectweb.medor.clone.api.Cloneable, Expression, Operator, Serializable
Known Implementing Classes:
BasicBinaryArithmeticOperator, DivideBy, Minus, Mod, Mult, Plus

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

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

Date
evaluate(Date op1, Date op2)
This fonction evaluate the comaparison between two java.util.Date variable;
String
evaluate(String op1, String op2)
This fonction evaluate the comaparison between two string variable;
String
evaluate(String op1, char op2)
This fonction evaluate the comaparison between two string variable;
String
evaluate(char op1, String op2)
This fonction evaluate the comaparison between two characters variable;
int
evaluate(char op1, char op2)
This fonction evaluate the comaparison between two characters 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;

Methods inherited from interface org.objectweb.medor.expression.api.BinaryOperator

getLeftExpression, getRightExpression, setLeftExpression, setRightExpression

Methods inherited from interface org.objectweb.medor.clone.api.Cloneable

clone

Methods inherited from interface org.objectweb.medor.expression.api.Expression

compileExpression, evaluate, getType

Methods inherited from interface org.objectweb.medor.expression.api.Operator

getExpression, getOperandNumber, getOperatorString, setExpression

Method Details

evaluate

public Date evaluate(Date op1,
                     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


evaluate

public String evaluate(String op1,
                       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 String evaluate(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 String evaluate(char op1,
                       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 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


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,
                       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,
                       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,
                       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 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(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 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,
                      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 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 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(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 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 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 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 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 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 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 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