All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.aguacate.function.spi.impl.FunctionEquals Maven / Gradle / Ivy

There is a newer version: 0.10.9
Show newest version
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 FunctionEquals extends AbstractFunction2 {

	public FunctionEquals(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(null, null);
		} else {
			logSuccess(msg);
			return new FunctionEvalResult("Not Equals", null);
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy