Skip to content

Instantly share code, notes, and snippets.

@novoj
Created August 8, 2014 12:53
Show Gist options
  • Save novoj/8744c54d116c437e8eef to your computer and use it in GitHub Desktop.
Save novoj/8744c54d116c437e8eef to your computer and use it in GitHub Desktop.
Loooong lambda
SelectableItem matchingItem = getItems().stream()
.filter(selectableItem -> selectableItem.getTitle().equals(title))
.findFirst().orElseGet(() -> SelectableItem.EMPTY).getId();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment