How to do function composition?

后端 未结 2 1876
甜味超标
甜味超标 2020-12-01 13:50

While rather impatiently waiting for Java 8 release and after reading brilliant \'State of the Lambda\' article from Brian Goetz I noticed that function composition was not

2条回答
  •  时光说笑
    2020-12-01 14:24

    There is a default interface function Function::andThen and Function::compose:

    Function toCountry = personToAddress.andThen(addressToCountry);
    

提交回复
热议问题