In the below code, I would like to add a log statement to both of .map and .orElse to indicate whether or not the value is true/false. In other words, in .map i would like to add "........true"
inside orElse i would to add "........false"
How can I modify the belwo code to include both of the aforementioned Strings.
code:
return OptionalsUtils.toOptional(this.getBuiltMovieRoomPersistentDatabase())
.map(builderObj -> builderObj.isOpen())
.orElse(false);