-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Sets.toImmutableEnumSet() #2667 #2676
Conversation
…mutableSet and ImmutableMap to work around fauxvsrride test: it was unable to handle generic types required for Enums currently.
…hed commit) Squashed commits: [80bbf86] Code and test for google#2667. Written in Sets and Maps instead of ImmutableSet and ImmutableMap to work around fauxvsrride test: it was unable to handle generic types required for Enums currently.
* commit '50d00427cfb835dbb8583d5f7ff8dffab3aabfad': Use Guava collectors to enforce same behavior in Exceptions Code and test for google#2667. Written in Sets and Maps instead of ImmutableSet and ImmutableMap to work around fauxvsrride test: it was unable to handle generic types required for Enums currently.
Sets::immutableEnumSet); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra line.
*/ | ||
public static <T, K extends Enum<K>, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableEnumMap( | ||
java.util.function.Function<? super T, K> keyFunction, | ||
java.util.function.Function<? super T, ? extends V> valueFunction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add @param
and @return
javadoc tags like methods below.
public static <T, K extends Enum<K>, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableEnumMap( | ||
java.util.function.Function<? super T, K> keyFunction, | ||
java.util.function.Function<? super T, ? extends V> valueFunction, | ||
BinaryOperator<V> mergeFunction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for javadoc.
We did this about a week after this PR, way back when. |
Code and test in Sets and Maps instead.