X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2Fold%2FOldTransferableGraphs.java;h=4786abd3b6d30aaa8ea0250e09a814c280cf9e0f;hp=2d786a580cc70437f2975a70548418c9921122ce;hb=f03893d9b643eae3f03debf7a656edbfa5b9b501;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java index 2d786a580..4786abd3b 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/old/OldTransferableGraphs.java @@ -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 callback) throws DatabaseException, TransferableGraphException { + public static void importGraph1(Session session, final OldTransferableGraph1 tg, IImportAdvisor advisor, final BiFunction 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); } }); }