public Predicate joinPredicate ( Schema sch1 , Schema sch2 ) { Predicate result = new Predicate ( ) ; Schema newsch = new Schema ( ) ; newsch . addAll ( sch1 ) ; newsch . addAll ( sch2 ) ; for ( Term t : terms ) if ( ! t . isApplicableTo ( sch1 ) && ! t . isApplicableTo ( sch2 ) && t . isApplicableTo ( newsch ) ) result . terms . add ( t ) ; return result . terms . size ( ) == 0 ? null : result ; }
Returns the sub - predicate consisting of terms that applies to the union of the two specified schemas but not to either schema separately .