sebbASF commented on code in PR #665:
URL:
https://github.com/apache/commons-collections/pull/665#discussion_r2623218441
##########
src/main/java/org/apache/commons/collections4/MultiMapUtils.java:
##########
@@ -170,6 +171,29 @@ public static boolean isEmpty(final MultiValuedMap<?, ?>
map) {
return map == null || map.isEmpty();
}
+ /**
+ * A utility method to invert the mappings from an inputMultimap
+ * and add them to an outputMultimap. Some {@code MultiValuedMap}
+ * implementations support the {@link MultiValuedMap#inverted()} method.
+ * These typically return a new multimap instance with the same class as
the original.
+ * Consider using this method instead if you wish to supply a particular
Review Comment:
'this method' is ambiguous here: does it refer to the method inverted()
which has just been described, or the method in this class?
I think it would be clearer to describe the usage for the current class
method before explaining that there are alternatives.
##########
src/main/java/org/apache/commons/collections4/MultiMapUtils.java:
##########
@@ -170,6 +171,29 @@ public static boolean isEmpty(final MultiValuedMap<?, ?>
map) {
return map == null || map.isEmpty();
}
+ /**
+ * A utility method to invert the mappings from an inputMultimap
+ * and add them to an outputMultimap. Some {@code MultiValuedMap}
Review Comment:
inputMultimap => input MultiValuedMap
outputMultimap => output MultiValuedMap
inputMultimap and outputMultimap are not Java types, and AFAICT they must
both be MultiValuedMap, rather than just Multimap
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]