Bug 511309 - Add a BiDoubleFunction to reduce the amount of auto-boxing
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/function/BiDoubleFunction.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/function/BiDoubleFunction.java new file mode 100644 index 0000000..1ac229c --- /dev/null +++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/function/BiDoubleFunction.java
@@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2017 BestSolution.at and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tom Schindl<tom.schindl@bestsolution.at> - initial API and implementation + *******************************************************************************/ +package org.eclipse.fx.core.function; + +import java.util.function.BiFunction; + +/** + * Represents a function that accepts a two double-valued argument and produces + * a result. This is the {@code double}-consuming primitive specialization for + * {@link BiFunction}. + * + * @param <R> + * the type of the result of the function + * @since 3.0 + */ +public interface BiDoubleFunction<R> { + /** + * Applies this function to the given arguments. + * + * @param t + * @param u + * @return the function result + */ + public R apply(double t, double u); + +}