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

com.github.basking2.sdsai.itrex.packages.BooleanPackage Maven / Gradle / Ivy

There is a newer version: 1.1.23
Show newest version
package com.github.basking2.sdsai.itrex.packages;

import com.github.basking2.sdsai.itrex.functions.FunctionInterface;
import com.github.basking2.sdsai.itrex.functions.bool.AndFunction;
import com.github.basking2.sdsai.itrex.functions.bool.CompareFunction;
import com.github.basking2.sdsai.itrex.functions.bool.NotFunction;
import com.github.basking2.sdsai.itrex.functions.bool.OrFunction;

/**
 * Common functions that return booleans. Comparisons and logical, such as and, or etc.
 */
public class BooleanPackage {
    public static final FunctionInterface and = new AndFunction();
    public static final FunctionInterface or = new OrFunction();
    public static final FunctionInterface not = new NotFunction();
    public static final FunctionInterface eq = new CompareFunction(CompareFunction.OP.EQ);
    public static final FunctionInterface gt = new CompareFunction(CompareFunction.OP.GT);
    public static final FunctionInterface gte = new CompareFunction(CompareFunction.OP.GTE);
    public static final FunctionInterface lt = new CompareFunction(CompareFunction.OP.LT);
    public static final FunctionInterface lte = new CompareFunction(CompareFunction.OP.LTE);
    public static final FunctionInterface t = (x,y) -> true;
    public static final FunctionInterface f = (x,y) -> false;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy