functional programming in Java

前端 未结 5 989
滥情空心
滥情空心 2021-01-17 13:58

how can you emulate functional programming in java, specifically, doing things like map a function to a collection of items?

map(func, new String[]{\"a\",\"         


        
5条回答
  •  清酒与你
    2021-01-17 14:42

    You could download OpenJDK 8 which is scheduled for prodcution release next year and use the new Lambda Expressions for functional programming. See http://macgyverdev.blogspot.se/2012/10/functional-programming-in-java.html for examples of how these closures will be used in the Collection APIs and how they compare with pre-Java 8 solutions like Guava and LambdaJ.

提交回复
热议问题