Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/202#discussion_r95061698
--- Diff: jena-base/src/main/java/org/apache/jena/atlas/lib/SetUtils.java
---
@@ -44,13 +42,26 @@ private SetUtils() {}
return s1.stream().anyMatch(s2::contains) ;
}
+ /**
+ * @param s1 a {@link Set}
+ * @param s2 a {@link Set}
+ * @return the eager set-theoretic union of {@code s1} and {@code s2}
+ *
+ * @see org.apache.jena.ext.com.google.common.collect.Sets#union(Set,
Set) for a lazy alternative
+ */
public static <T> Set<T> union(Set<? extends T> s1, Set<? extends T>
s2) {
Set<T> s3 = new HashSet<>(s1) ;
s3.addAll(s2) ;
return s3 ;
}
- /** union difference intersection : those elements in s1 or s2 but not
both. */
+ /**
+ * @param s1 a {@link Set}
+ * @param s2 a {@link Set}
+ * @return eager union difference intersection : those elements in
{@code s1} or {@code s2} but not both
--- End diff --
Symmetric set difference == the-union set-difference the-intersection.
set-difference(A,B) is elts in A but not in B
Symmetric set difference(A,B) is elts in A or B but not both.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---