net.sf.aguacate.function.spi.impl.FunctionNotEquals Maven / Gradle / Ivy
package net.sf.aguacate.function.spi.impl;
import java.util.Collection;
import net.sf.aguacate.function.FunctionEvalResult;
import net.sf.aguacate.function.spi.AbstractFunction2;
import net.sf.aguacate.util.parameter.Parameter;
public class FunctionNotEquals extends AbstractFunction2 {
public FunctionNotEquals(Collection methods, String name, String message, Parameter parameter1,
Parameter parameter2) {
super(methods, name, message, parameter1, parameter2);
}
@Override
protected FunctionEvalResult evaluate(String msg, Object value1, Object value2) {
if (value1.equals(value2)) {
logFailure(msg);
return new FunctionEvalResult("Equals", null);
} else {
logSuccess(msg);
return new FunctionEvalResult(null, null);
}
}
}