Package inra.ijpb.label.select
Interface RelationalOperator
public interface RelationalOperator
Implementation of a relational operator that computes a boolean value from
two scalar input values. Declare abstract methods for integer and
floating-point comparisons. Common relational operators are provided as
static constants.
- Author:
- dlegland
-
Field Summary
Fields Modifier and Type Field Description static RelationalOperatorEQImplementation of the "Equal" operator.static RelationalOperatorGEImplementation of the "Greater Than Or Equal" operator.static RelationalOperatorGTImplementation of the "Greater Than" operator.static RelationalOperatorLEImplementation of the "Lower Than Or Equal" operator.static RelationalOperatorLTImplementation of the "Lower Than" operator.static RelationalOperatorNEImplementation of the "Not Equal" operator. -
Method Summary
-
Field Details
-
GT
Implementation of the "Greater Than" operator. -
LT
Implementation of the "Lower Than" operator. -
GE
Implementation of the "Greater Than Or Equal" operator. -
LE
Implementation of the "Lower Than Or Equal" operator. -
EQ
Implementation of the "Equal" operator. -
NE
Implementation of the "Not Equal" operator.
-
-
Method Details
-
evaluate
boolean evaluate(int value1, int value2)Evaluates this operator from two integer values.- Parameters:
value1- the first integer value.value2- the second integer value.- Returns:
- the result of the relational operator.
-
evaluate
boolean evaluate(double value1, double value2)Evaluates this operator from two floating-point values.- Parameters:
value1- the first floating-point value.value2- the second floating-point value.- Returns:
- the result of the relational operator.
-