Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/202#discussion_r95061555
--- 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 --
If you don't like the way I'm using those terms, I'll remove them. My real
purpose is just to make sure people know they can choose between these guys
(which do calculations immediately) and the Guava ones, which amortize the cost
over accesses.
---
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.
---