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:
boolean idExists = false;
String idToCheck = "someId";
for (Tab t : tabPane.getTabs()){
if(t.getId().equals(idToCheck)) {
idExists = true;
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…