![JAR search and dependency download from the Maven repository](/logo.png)
panda.el.opt.logic.OrableOpt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.el.opt.logic;
import panda.el.ELContext;
import panda.el.opt.AbstractTwoOpt;
/**
* (A ||| B) : if (A is not empty and not false) return A; else return B;
*/
public class OrableOpt extends AbstractTwoOpt {
public int getPriority() {
return 12;
}
public Object calculate(ELContext ec) {
Object lval = getLeft(ec);
if (!Logics.isFalse(lval)) {
return lval;
}
return getRight(ec);
}
public String operator() {
return "|||";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy