Skip to content

Instantly share code, notes, and snippets.

@rarous
Forked from novoj/Lambda formatting
Last active August 29, 2015 14:11
Show Gist options
  • Save rarous/33fad9a0eb7a5246b0f1 to your computer and use it in GitHub Desktop.
Save rarous/33fad9a0eb7a5246b0f1 to your computer and use it in GitHub Desktop.
private Map<Integer, ? extends Address> getAddressIndex(Optional<SubjectData> currentSubjectData) {
return currentSubjectData.
map(s -> s.getAddresses().stream().
filter(a -> a.getEsoId() != null).
collect(toMap(Address::getEsoId, t -> t))).
orElse(emptyMap());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment