diff --git a/hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/BinaryOperation.java b/hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/BinaryOperation.java
index dcf20b0..4713b23 100644
--- a/hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/BinaryOperation.java
+++ b/hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/BinaryOperation.java
@@ -30,7 +30,7 @@
* @author Pablo Rodríguez Mier <pablo.rodriguez.mier@usc.es>
* @author Adrián González Sieira <adrian.gonzalez@usc.es>
*/
-public class BinaryOperation implements BinaryFunction {
+public class BinaryOperation> implements BinaryFunction {
private E maxElem;
private E identityElem;
@@ -45,9 +45,9 @@ public class BinaryOperation implements BinaryFunction {
*/
public BinaryOperation(BinaryFunction operation, E identityElem, E maxElem) {
// Check properties
- assert operation.apply(identityElem, maxElem).equals(maxElem);
- assert operation.apply(maxElem, identityElem).equals(maxElem);
- assert operation.apply(identityElem, identityElem).equals(identityElem);
+ assert operation.apply(identityElem, maxElem).compareTo(maxElem) == 0;
+ assert operation.apply(maxElem, identityElem).compareTo(maxElem) == 0;
+ assert operation.apply(identityElem, identityElem).compareTo(identityElem) == 0;
//Preconditions.checkArgument(operation.apply(identityElem, maxElem).equals(maxElem), "Property error: I x A != A");
//Preconditions.checkArgument(operation.apply(maxElem, identityElem).equals(maxElem), "Property error: A x I != A");
//Preconditions.checkArgument(operation.apply(identityElem, identityElem).equals(identityElem), "Property error: I x I != I");