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

Creates wrapper classes, functions and tests for maps. #569

Closed
wants to merge 4 commits into from

Conversation

jensonwe
Copy link

@jensonwe jensonwe commented Nov 8, 2018

No description provided.

}

static <K, V> void setAll(Map<K, V> target, Map<K, V> newValues) {
target.clear();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This implementation is not optimal because it leads to unnecessary removing and adding of values.
Better is

target.keySet().retainAll(newValues.keySet());
target.putAll(newValues);	

@manuel-mauky
Copy link
Collaborator

I'm closing this PullRequest due to many formatting issues. This makes it hard to include the actual features. Instead I've created a new branch with only the actual changes of this PR: #571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants