[ https://issues.apache.org/jira/browse/KAFKA-9405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17026224#comment-17026224 ]
ASF GitHub Bot commented on KAFKA-9405: --------------------------------------- ijuma commented on pull request #7937: KAFKA-9405: Use Map API computeIfAbsent Where Applicable URL: https://github.com/apache/kafka/pull/7937 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Use Map API computeIfAbsent Where Applicable > -------------------------------------------- > > Key: KAFKA-9405 > URL: https://issues.apache.org/jira/browse/KAFKA-9405 > Project: Kafka > Issue Type: Improvement > Components: clients > Reporter: David Mollitor > Priority: Minor > > {quote} > to implement a multi-value map, Map<K,Collection<V>>, supporting multiple > values per key: > > map.computeIfAbsent(key, k -> new HashSet<V>()).add(v); > {quote} > https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#computeIfAbsent-K-java.util.function.Function- -- This message was sent by Atlassian Jira (v8.3.4#803005)