/** * Compare triple patterns, taking into account variable indices. * The equality function ignores differences between variables. */ @Override public boolean sameAs(Object o) { if (! (o instanceof TriplePattern) ) return false; TriplePattern other = (TriplePattern) o; return Node_RuleVariable.sameNodeAs(subject, other.subject) && Node_RuleVariable.sameNodeAs(predicate, other.predicate) && Node_RuleVariable.sameNodeAs(object, other.object); }
/** * Compare triple patterns, taking into account variable indices. * The equality function ignores differences between variables. */ @Override public boolean sameAs(Object o) { if (! (o instanceof TriplePattern) ) return false; TriplePattern other = (TriplePattern) o; return Node_RuleVariable.sameNodeAs(subject, other.subject) && Node_RuleVariable.sameNodeAs(predicate, other.predicate) && Node_RuleVariable.sameNodeAs(object, other.object); }
/** * Compare Functors, taking into account variable indices. * The equality function ignores differences between variables. */ @Override public boolean sameAs(Object o) { if (o instanceof Functor) { Functor f2 = (Functor)o; if (name.equals(f2.name) && args.length == f2.args.length) { for (int i = 0; i < args.length; i++) { if (! Node_RuleVariable.sameNodeAs(args[i], f2.args[i])) return false; } return true; } } return false; }
/** * Compare Functors, taking into account variable indices. * The equality function ignores differences between variables. */ @Override public boolean sameAs(Object o) { if (o instanceof Functor) { Functor f2 = (Functor)o; if (name.equals(f2.name) && args.length == f2.args.length) { for (int i = 0; i < args.length; i++) { if (! Node_RuleVariable.sameNodeAs(args[i], f2.args[i])) return false; } return true; } } return false; }