How to use Optional's map and orElseGet methods when calling a void method based on the optional value

前端 未结 0 876
闹比i
闹比i 2021-01-06 06:38

I have a Java Optional variable that I\'m using as below.

Optional formsOptional = input.data().get().forms();
if(formsOptional.isPresent()) {
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题