]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl2.java
Replaced use of deprecated BinaryFunction et al with BiFunction et al
[simantics/platform.git] / bundles / org.simantics.browsing.ui.swt / src / org / simantics / browsing / ui / swt / GraphExplorerImpl2.java
index 79bd35b872b2991a05537aedede0b62aa50a6561..928bed03facc844eea8ef2603307e0a2c988f965 100644 (file)
@@ -30,6 +30,7 @@ import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.BiFunction;
 import java.util.function.Consumer;
 
 import org.eclipse.core.runtime.Assert;
@@ -164,7 +165,6 @@ import org.simantics.browsing.ui.swt.internal.Threads;
 import org.simantics.db.layer0.SelectionHints;
 import org.simantics.ui.SimanticsUI;
 import org.simantics.utils.datastructures.BijectionMap;
-import org.simantics.utils.datastructures.BinaryFunction;
 import org.simantics.utils.datastructures.MapList;
 import org.simantics.utils.datastructures.disposable.AbstractDisposable;
 import org.simantics.utils.datastructures.hints.IHintContext;
@@ -251,10 +251,10 @@ public class GraphExplorerImpl2 extends GraphExplorerImplBase implements GraphEx
     private boolean expand;
     private boolean verticalBarVisible = false;
     
-    private BinaryFunction<Object[], GraphExplorer, Object[]>  selectionTransformation = new BinaryFunction<Object[], GraphExplorer, Object[]>() {
+    private BiFunction<GraphExplorer, Object[], Object[]> selectionTransformation = new BiFunction<GraphExplorer, Object[], Object[]>() {
 
         @Override
-        public Object[] call(GraphExplorer explorer, Object[] objects) {
+        public Object[] apply(GraphExplorer explorer, Object[] objects) {
             Object[] result = new Object[objects.length];
             for (int i = 0; i < objects.length; i++) {
                 IHintContext context = new AdaptableHintContext(SelectionHints.KEY_MAIN);
@@ -885,7 +885,7 @@ public class GraphExplorerImpl2 extends GraphExplorerImplBase implements GraphEx
     }
     
     protected Object[] transformSelection(Object[] objects) {
-        return selectionTransformation.call(this, objects);
+        return selectionTransformation.apply(this, objects);
     }
     
     protected static Object[] filter(SelectionFilter filter, NodeContext[] contexts) {
@@ -898,7 +898,7 @@ public class GraphExplorerImpl2 extends GraphExplorerImplBase implements GraphEx
 
        @Override
        public void setSelectionTransformation(
-                       BinaryFunction<Object[], GraphExplorer, Object[]> f) {
+                       BiFunction<GraphExplorer, Object[], Object[]> f) {
                this.selectionTransformation = f;
        }