Class IntegerOperations
- java.lang.Object
-
- net.ssehub.easy.varModel.cstEvaluation.IntegerOperations
-
public class IntegerOperations extends java.lang.ObjectImplements integer operations.- Author:
- Holger Eichelberger, El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static IOperationEvaluatorDIVISION_INT_INT(package private) static IOperationEvaluatorEQUALS_INT_REAL(package private) static IOperationEvaluatorMAX_INT_INT(package private) static IOperationEvaluatorMIN_INT_INT(package private) static IOperationEvaluatorMINUS_INT_INT(package private) static IOperationEvaluatorMODULO_INT_INT(package private) static IOperationEvaluatorMULTIPLICATION_INT_INT(package private) static IOperationEvaluatorPLUS_INT_INT(package private) static IOperationEvaluatorUNEQUALS_INT_REAL
-
Constructor Summary
Constructors Modifier Constructor Description privateIntegerOperations()Prevents external creation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static EvaluationAccessorarithmeticOperationIntInt(EvaluationAccessor operand, EvaluationAccessor[] arguments, ArithmeticOperationType type)Implements arithmetic operations of two integer variables/values.(package private) static EvaluationAccessorequalsIntReal(EvaluationAccessor operand, EvaluationAccessor[] arguments, boolean negate)Implements the mixed int-real equality operation.private static EvaluationAccessorminmaxOperationIntInt(EvaluationAccessor operand, EvaluationAccessor[] arguments, boolean min)Implements min/max operations of two integer variables/values.static voidregister()Registers the defined operations.
-
-
-
Field Detail
-
EQUALS_INT_REAL
static final IOperationEvaluator EQUALS_INT_REAL
-
UNEQUALS_INT_REAL
static final IOperationEvaluator UNEQUALS_INT_REAL
-
PLUS_INT_INT
static final IOperationEvaluator PLUS_INT_INT
-
MINUS_INT_INT
static final IOperationEvaluator MINUS_INT_INT
-
MULTIPLICATION_INT_INT
static final IOperationEvaluator MULTIPLICATION_INT_INT
-
DIVISION_INT_INT
static final IOperationEvaluator DIVISION_INT_INT
-
MODULO_INT_INT
static final IOperationEvaluator MODULO_INT_INT
-
MIN_INT_INT
static final IOperationEvaluator MIN_INT_INT
-
MAX_INT_INT
static final IOperationEvaluator MAX_INT_INT
-
-
Method Detail
-
register
public static final void register()
Registers the defined operations.
-
equalsIntReal
static EvaluationAccessor equalsIntReal(EvaluationAccessor operand, EvaluationAccessor[] arguments, boolean negate)
Implements the mixed int-real equality operation.- Parameters:
operand- the operandarguments- the argumentsnegate- whether the result shall be negated- Returns:
- the comparison result, null if the operation cannot be applied
-
arithmeticOperationIntInt
private static EvaluationAccessor arithmeticOperationIntInt(EvaluationAccessor operand, EvaluationAccessor[] arguments, ArithmeticOperationType type)
Implements arithmetic operations of two integer variables/values.- Parameters:
operand- the operandarguments- the argumentstype- The desired arithmetic operation.- Returns:
- The result of the arithmetic operation, null if the operation cannot be applied
-
minmaxOperationIntInt
private static EvaluationAccessor minmaxOperationIntInt(EvaluationAccessor operand, EvaluationAccessor[] arguments, boolean min)
Implements min/max operations of two integer variables/values.- Parameters:
operand- the operandarguments- the argumentsmin- If true the min operation will be applied, max otherwise.- Returns:
- The min/max of the two parameters, null if the operation cannot be applied
-
-