Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Add Sets.toImmutableEnumSet() #2667 #2676

wants to merge 4 commits into from

Conversation

tli2
Copy link

@tli2 tli2 commented Dec 6, 2016

Code and test in Sets and Maps instead.

…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);
}


Copy link

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) {
Copy link

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) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for javadoc.

@kluever kluever changed the title #2667 Add Sets.toImmutableEnumSet() #2667 Oct 28, 2019
@cpovirk
Copy link
Member

cpovirk commented Jun 26, 2023

We did this about a week after this PR, way back when.

@cpovirk cpovirk closed this Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants