Java 8 Lambda function that throws exception?

后端 未结 26 1753
臣服心动
臣服心动 2020-11-22 03:14

I know how to create a reference to a method that has a String parameter and returns an int, it\'s:

Function         


        
26条回答
  •  时光说笑
    2020-11-22 03:21

    Use Jool Library or say jOOλ library from JOOQ. It not only provides unchecked exception handled interfaces but also provides Seq class with lots of useful methods.

    Also, it contains Functional Interfaces with up to 16 parameters. Also, it provides Tuple class which is used in different scenarios.

    Jool Git Link

    Specifically in library lookup for org.jooq.lambda.fi.util.function package. It contains all the Interfaces from Java-8 with Checked prepended. See below for reference:-

提交回复
热议问题