*******************************************************************************/
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;
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() {
public void perform(WriteOnlyGraph graph) throws DatabaseException {
process.write(graph);
if(callback != null)
- callback.call(graph, process);
+ callback.apply(graph, process);
}
});
}