org.objectweb.medor.expression.api
Interface Comparator

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

public interface Comparator
extends BinaryOperator

This interface represents a mathematical comparator. Comparators are: > < <= >= !=. the 'evaluate' methods do the comparison betwwen different type of variables: int, char, boolean,...

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
 boolean evaluate(boolean op1, boolean op2)
          This fonction evaluate the comaparison between two boolean variable;
 boolean evaluate(char op1, char op2)
          This fonction evaluate the comaparison between two characters variable;
 boolean evaluate(double op1, double op2)
          This fonction evaluate the comaparison between two double variable;
 boolean evaluate(double op1, float op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(double op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(double op1, long op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(double op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(float op1, double op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(float op1, float op2)
          This fonction evaluate the comaparison between two floats variables;
 boolean evaluate(float op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(float op1, long op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(float op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(int op1, double op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(int op1, float op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(int op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(int op1, long op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(int op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(long op1, double op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(long op1, float op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(long op1, int op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(long op1, long op2)
          This fonction evaluate the comaparison between two long variable;
 boolean evaluate(long op1, short op2)
          This fonction evaluate the comaparison between two numerics variables;
 boolean evaluate(java.lang.Object op1, java.lang.Object op2)
          This fonction evaluate the comaparison between two java Object ;
 boolean 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 boolean evaluate(java.lang.Object op1,
                        java.lang.Object op2)
This fonction evaluate the comaparison between two java Object ;

Parameters:
op1 - Object
op2 - Object
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - int
op2 - int
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - int
op2 - short
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - int
op2 - long
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - int
op2 - float
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - int
op2 - double
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - float
op2 - float
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - float
op2 - short
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - float
op2 - int
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - float
op2 - long
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - float
op2 - double
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - char
op2 - char
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - long
op2 - long
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - long
op2 - short
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - long
op2 - int
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - long
op2 - float
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - long
op2 - double
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - double
op2 - double
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - double
op2 - short
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - double
op2 - int
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - double
op2 - float
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - double
op2 - long
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - String
op2 - String
Returns:
true if the comparison is verified

evaluate

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

Parameters:
op1 - boolean
op2 - boolean
Returns:
true if the comparison is verified; in case of <, > compartor it always return false