-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
LinkedHashMap.keySet() order #1850 #1854
Conversation
|
||
@Test | ||
public void shouldKeepKeySetOrder() { | ||
final Set<Integer> keySet = LinkedHashMap.of(4, "d", 1, "a", 2, "b").keySet(); |
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.
👍
@@ -32,9 +32,9 @@ | |||
|
|||
private static final LinkedHashSet<?> EMPTY = new LinkedHashSet<>(LinkedHashMap.empty()); | |||
|
|||
private final LinkedHashMap<T, T> map; | |||
private final LinkedHashMap<T, Object> map; |
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.
would <T, ?>
also work, or just <T, Object>
?
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.
No, '?' fails at compilation stage
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.
k, thanks
@ruslansennov looks great, thank you! |
No description provided.