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

panda.el.opt.logic.NEQOpt Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
package panda.el.opt.logic;

import panda.el.ELContext;
import panda.el.opt.AbstractTwoOpt;

/**
 * 不等于
 */
public class NEQOpt extends AbstractTwoOpt {
	public int getPriority() {
		return 6;
	}

	public Object calculate(ELContext ec) {
		Object lval = getLeft(ec);
		Object rval = getRight(ec);

		if (lval == rval) {
			return false;
		}
		if (lval == null || rval == null) {
			return true;
		}
		
		return !lval.equals(rval);
	}

	public String operator() {
		return "!=";
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy