]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Added getPredicate() for Modification class 48/3148/2
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 23 Aug 2019 12:49:10 +0000 (15:49 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 23 Aug 2019 12:49:41 +0000 (15:49 +0300)
Left or right side statement can be null, but predicate is expected to
be the same on both statements.

gitlab #10

Change-Id: Idce23d4bc54ae19876bb444a5dd10b2af9661c04

org.simantics.interop/src/org/simantics/interop/test/GraphChanges.java

index 48f43596fe0ce69cd82f85af2a917f31f8b7a247..fb72ba50f8e7e8b2b84266217f722405ab85b018 100644 (file)
@@ -83,6 +83,12 @@ public class GraphChanges {
                        this.rightStm = rightStm;
                }
                
+               public Resource getPredicate() {
+                   if (leftStm != null)
+                       return leftStm.getPredicate();
+                   return rightStm.getPredicate();
+               }
+               
                @Override
                public boolean equals(Object obj) {
                        if (obj.getClass() != this.getClass())