I need to get the String value which is the identifier, but this return void instead of string value. How can I return the string value?
String previousReadyForHome = information.getPreviousContact().ifPresent(val->{
Arrays.stream(val.basic.identifiers).filter(s -> s.type == readyForHomeType)
.map(s -> s.identifier).findFirst().orElse(null);
});
ifPresent. but.mapor.flatMapon the givenOptional.