]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java
Enhancements to modelled STS-tests
[simantics/platform.git] / bundles / org.simantics.graph.db / src / org / simantics / graph / db / old / OldTransferableGraphs.java
index 2d786a580cc70437f2975a70548418c9921122ce..4786abd3b6d30aaa8ea0250e09a814c280cf9e0f 100644 (file)
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.simantics.graph.db.old;
 
+import java.util.function.BiFunction;
+
 import org.simantics.db.ReadGraph;
 import org.simantics.db.Session;
 import org.simantics.db.WriteGraph;
@@ -22,11 +24,10 @@ import org.simantics.graph.db.IImportAdvisor;
 import org.simantics.graph.db.ImportAdvisor;
 import org.simantics.graph.db.TransferableGraphException;
 import org.simantics.graph.representation.old.OldTransferableGraph1;
-import org.simantics.utils.datastructures.BinaryFunction;
 
 public class OldTransferableGraphs {
 
-    public static void importGraph1(Session session, final OldTransferableGraph1 tg, IImportAdvisor advisor, final BinaryFunction<Boolean, WriteOnlyGraph, OldTransferableGraphImportProcess1> callback) throws DatabaseException, TransferableGraphException {
+    public static void importGraph1(Session session, final OldTransferableGraph1 tg, IImportAdvisor advisor, final BiFunction<WriteOnlyGraph, OldTransferableGraphImportProcess1, Boolean> callback) throws DatabaseException, TransferableGraphException {
         final OldTransferableGraphImportProcess1 process = new OldTransferableGraphImportProcess1(tg, 
                 advisor == null ? new ImportAdvisor() : advisor);
         session.syncRequest(new ReadRequest() {
@@ -40,7 +41,7 @@ public class OldTransferableGraphs {
             public void perform(WriteOnlyGraph graph) throws DatabaseException {
                 process.write(graph);
                 if(callback != null)
-                    callback.call(graph, process);
+                    callback.apply(graph, process);
             }
         });
     }