org.objectweb.medor.filter.lib
Class Plus

java.lang.Object
  |
  +--org.objectweb.medor.filter.lib.BasicBinaryOperator
        |
        +--org.objectweb.medor.filter.lib.BasicBinaryArithmeticOperator
              |
              +--org.objectweb.medor.filter.lib.Plus
All Implemented Interfaces:
BinaryArithmeticOperator, BinaryOperator, Cloneable, java.lang.Cloneable, Expression, Operator

public class Plus
extends BasicBinaryArithmeticOperator

This operator operates on the numeric Types and the string Type. The operation performed between string is the concatenation (string1+string2).


Field Summary
 
Fields inherited from class org.objectweb.medor.filter.lib.BasicBinaryOperator
left, leftResult, result, right, rightResult, type, verified
 
Fields inherited from interface org.objectweb.medor.filter.api.Operator
ABS, AND, BITWIZE, CONCAT, CONDAND, CONDOR, DIV, EQUAL, FIRSTLOCATE, GREATER, GREATEREQUAL, IN, INDEXEDLOCATE, LENGTH, LOWER, LOWEREQUAL, MEMBEROF, MINUS, MULT, NAV, NOT, NOTEQUAL, NOTMEMBEROF, OR, PLUS, SQRT, SUBSTRING, UMINUS
 
Constructor Summary
Plus()
           
Plus(Expression l, Expression r)
           
 
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;
 java.sql.Timestamp evaluate(java.sql.Timestamp op1, java.sql.Timestamp op2)
          This fonction evaluate the comaparison between two java.sql.Timestamp variable;
 java.sql.Time evaluate(java.sql.Time op1, java.sql.Time op2)
          This fonction evaluate the comaparison between two java.sql.Time variable;
 java.lang.String getOperatorString()
          Returns the String representing the operator in Java
 
Methods inherited from class org.objectweb.medor.filter.lib.BasicBinaryArithmeticOperator
compileExpression, evaluate
 
Methods inherited from class org.objectweb.medor.filter.lib.BasicBinaryOperator
clone, getExpression, getLeftExpression, getOperandNumber, getResult, getRightExpression, getType, isCompiled, setExpression, setLeftExpression, setRightExpression
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.medor.filter.api.BinaryOperator
getLeftExpression, getRightExpression, setLeftExpression, setRightExpression
 
Methods inherited from interface org.objectweb.medor.filter.api.Operator
getExpression, getOperandNumber, setExpression
 
Methods inherited from interface org.objectweb.medor.filter.api.Expression
getResult, getType, isCompiled
 
Methods inherited from interface org.objectweb.medor.api.Cloneable
clone
 

Constructor Detail

Plus

public Plus()

Plus

public Plus(Expression l,
            Expression r)
Method Detail

evaluate

public int evaluate(int op1,
                    int op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the arithmetic operation between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - integer
op2 - integer
Returns:
an integer result

evaluate

public int evaluate(int op1,
                    short op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - int
op2 - short
Returns:
an int as in Java programming language

evaluate

public long evaluate(int op1,
                     long op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - int
op2 - long
Returns:
a long result as in Java programming language

evaluate

public float evaluate(int op1,
                      float op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - int
op2 - float
Returns:
a float result as in Java programming language

evaluate

public double evaluate(int op1,
                       double op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - int
op2 - double
Returns:
a double as in Java programming language

evaluate

public float evaluate(float op1,
                      float op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two floats variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - float
op2 - float
Returns:
a float resultas in Java programming language

evaluate

public float evaluate(float op1,
                      short op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - float
op2 - short
Returns:
a float result as in Java programming language

evaluate

public float evaluate(float op1,
                      int op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - float
op2 - int
Returns:
a float result as in Java programming language

evaluate

public float evaluate(float op1,
                      long op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - float
op2 - long
Returns:
a float result as in Java programming language

evaluate

public double evaluate(float op1,
                       double op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - float
op2 - double
Returns:
a double result as in Java programming language

evaluate

public int evaluate(char op1,
                    char op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two characters variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - character
op2 - character
Returns:
an int value

evaluate

public java.lang.String evaluate(char op1,
                                 java.lang.String op2)
                          throws TypingException
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two characters variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
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)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two long variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - long
op2 - long
Returns:
a long result as in Java programming language

evaluate

public long evaluate(long op1,
                     short op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - long
op2 - short
Returns:
a long result as in Java programming language

evaluate

public long evaluate(long op1,
                     int op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - long
op2 - int
Returns:
a long result as in Java programming language

evaluate

public float evaluate(long op1,
                      float op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - long
op2 - float
Returns:
a float result as in Java programming language

evaluate

public double evaluate(long op1,
                       double op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - long
op2 - double
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       double op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two double variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - double
op2 - double
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       short op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - double
op2 - short
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       int op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - double
op2 - int
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       float op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - double
op2 - float
Returns:
a double result as in Java programming language

evaluate

public double evaluate(double op1,
                       long op2)
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two numerics variables;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
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
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two string variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
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
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two string variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
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.sql.Timestamp evaluate(java.sql.Timestamp op1,
                                   java.sql.Timestamp op2)
                            throws TypingException
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two java.sql.Timestamp variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - TimeStamp
op2 - Timestamp
Returns:
a Timestamp value as in java programming language
Throws:
TypingException - if this operation is not supported

evaluate

public java.sql.Time evaluate(java.sql.Time op1,
                              java.sql.Time op2)
                       throws TypingException
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two java.sql.Time variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - Time
op2 - Time
Returns:
a Time 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
Description copied from interface: BinaryArithmeticOperator
This fonction evaluate the comaparison between two java.util.Date variable;

Specified by:
evaluate in interface BinaryArithmeticOperator
Specified by:
evaluate in class BasicBinaryArithmeticOperator
Parameters:
op1 - Date
op2 - Date
Returns:
a Date value as in java programming language
Throws:
TypingException - if this operation is not supported

getOperatorString

public java.lang.String getOperatorString()
Description copied from interface: Operator
Returns the String representing the operator in Java

Returns:
the String representing the operator in Java