Deprecate BinaryFunction in favor of BiFunction functional interface 69/269/2
authorjsimomaa <jani.simomaa@gmail.com>
Sat, 14 Jan 2017 07:29:15 +0000 (09:29 +0200)
committerJani Simomaa <jani.simomaa@vtt.fi>
Sat, 14 Jan 2017 08:00:43 +0000 (10:00 +0200)
refs #6960

Change-Id: I1b543a6781239a4da3da6baab741e66717f01485

bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/BinaryFunction.java

index a808a1e41d76dd0e0990bb4509f3d56822b4710a..98412e50e4e55a99ce66348561100d3ff4c0401d 100644 (file)
  *******************************************************************************/
 package org.simantics.utils.datastructures;
 
-public interface BinaryFunction<R, A1, A2> {
+import java.util.function.BiFunction;
+
+/**
+ * @deprecated use {@link BiFunction} instead
+ */
+@Deprecated
+@FunctionalInterface
+public interface BinaryFunction<R, A1, A2> extends BiFunction<A1, A2, R>{
 
     R call(A1 arg1, A2 arg2);
 
+    @Override
+    default R apply(A1 arg, A2 arg2) {
+        return call(arg, arg2);
+    }
 }