package speiger.src.collections.booleans.functions.function;

import java.util.function.BiFunction;

/**
 * A Type Specific Unary Operator to support Compute/Merge functions with type specific methods to reduce boxing/unboxing
 */
public interface BooleanBooleanUnaryOperator extends BiFunction<Boolean, Boolean, Boolean>
{
	/**
	 * A Type Specifc apply method to reduce boxing/unboxing.
	 * Applies this function to the given arguments.
	 *
	 * @param k the first function argument
	 * @param v the second function argument
	 * @return the function result
	 */
	public boolean applyAsBoolean(boolean k, boolean v);
	
	@Override
	public default Boolean apply(Boolean k, Boolean v) { return Boolean.valueOf(applyAsBoolean(k.booleanValue(), v.booleanValue())); }
}