-
Notifications
You must be signed in to change notification settings - Fork 50
streams done #54
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
base: master
Are you sure you want to change the base?
streams done #54
Conversation
StreamExersise2 1 of 3 tests done
part 1 StreamExersise2 3 of 3 tests done
part3 lambdas done
| private boolean hasExperienceInEpam(Employee employee){ | ||
| return employee.getJobHistory().stream() | ||
| .filter(j -> j.getEmployer().equals("epam")) | ||
| .count() > 0; |
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.
Use anyMatch instead.
| return employee.getJobHistory().stream() | ||
| .limit(1) | ||
| .filter(j -> j.getEmployer().equals("epam")) | ||
| .count() > 0; |
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.
anyMatch
| throw new UnsupportedOperationException(); | ||
| return (mp, p) -> { | ||
| mp.getKeyById().put(p.getKey().getId(), p.getKey()); | ||
| if (!mp.getValueById().containsKey(p.getValue().getKeyId())) |
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.
Use computeIfAbsent
No description provided.