Java 8 method references: provide a Supplier capable of supplying a parameterized result

后端 未结 3 1931
醉话见心
醉话见心 2020-11-28 20:44

I\'d like to use

java.util.Optional.orElseThrow()

with an Exception type that asks for a constructor parameter. Something like this:

3条回答
提交回复
热议问题