Specifically, I have TabPane, and I would like to know if there is element with specific ID in it.
So, I would like to do this with lambda expression in Java:
Try to use anyMatch of Lambda Expression. It is much better approach.
boolean idExists = tabPane.getTabs().stream() .anyMatch(t -> t.getId().equals(idToCheck));