]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.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 / GraphExplorerImpl.java
index 62b284858cd9893383719e5ec7b89632437335f9..0e45f86ca4843fe53233ecec6217a07026ee4954 100644 (file)
@@ -31,6 +31,7 @@ import java.util.concurrent.ScheduledExecutorService;
 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;
@@ -161,7 +162,6 @@ import org.simantics.browsing.ui.swt.internal.Threads;
 import org.simantics.db.layer0.SelectionHints;
 import org.simantics.utils.ObjectUtils;
 import org.simantics.utils.datastructures.BijectionMap;
-import org.simantics.utils.datastructures.BinaryFunction;
 import org.simantics.utils.datastructures.disposable.AbstractDisposable;
 import org.simantics.utils.datastructures.hints.IHintContext;
 import org.simantics.utils.threads.IThreadWorkQueue;
@@ -544,10 +544,10 @@ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, Graph
     protected BasePostSelectionProvider          selectionProvider        = new BasePostSelectionProvider();
     protected SelectionDataResolver              selectionDataResolver;
     protected SelectionFilter                    selectionFilter;
-    protected BinaryFunction<Object[], GraphExplorer, Object[]>  selectionTransformation = new BinaryFunction<Object[], GraphExplorer, Object[]>() {
+    protected 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);
@@ -1812,7 +1812,7 @@ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, Graph
     }
 
     @Override
-    public void setSelectionTransformation(BinaryFunction<Object[], GraphExplorer, Object[]> f) {
+    public void setSelectionTransformation(BiFunction<GraphExplorer, Object[], Object[]> f) {
         this.selectionTransformation = f;
     }
 
@@ -3168,7 +3168,7 @@ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, Graph
     }
 
     protected Object[] transformSelection(Object[] objects) {
-        return selectionTransformation.call(this, objects);
+        return selectionTransformation.apply(this, objects);
     }
 
     protected static Object[] filter(SelectionFilter filter, NodeContext[] contexts) {