org.objectweb.medor.expression.api

Interface Comparator

All Superinterfaces:
BinaryOperator, org.objectweb.medor.clone.api.Cloneable, Expression, Operator, Serializable
Known Implementing Classes:
BasicComparator, Equal, Greater, GreaterEqual, Lower, LowerEqual, NotEqual

public interface Comparator
extends BinaryOperator

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

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

boolean
evaluate(Object op1, Object op2)
This fonction evaluate the comaparison between two java Object ;
boolean
evaluate(String op1, String op2)
This fonction evaluate the comaparison between two string variable;
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;

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 boolean evaluate(Object op1,
                        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(String op1,
                        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


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