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

com.github.basking2.sdsai.itrex.functions.bool.AbstractBooleanFunction Maven / Gradle / Ivy

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

import com.github.basking2.sdsai.itrex.functions.AbstractAggregatingFunction;
import com.github.basking2.sdsai.itrex.util.TypeConversion;

/**
 * Perform a boolean function on all arguments.
 */
public abstract class AbstractBooleanFunction extends AbstractAggregatingFunction {

    /**
     * Construct an function that will start aggregating values with initialValue as the first R value.
     * 

* If an implementation is summing numbers, initialValue may be 0. * If an implementation is building a list, initialValue may be an empty list. * * @param initialValue An initial value. */ public AbstractBooleanFunction(Boolean initialValue) { super(initialValue); } @Override public Result applyT(Boolean aBoolean, Object o) { return booleanOperation(aBoolean, TypeConversion.toBoolean(o)); } public abstract Result booleanOperation(Boolean b1, Boolean b2); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy