Function Object in Java

后端 未结 5 761
醉话见心
醉话见心 2021-02-03 11:32

I wanna implement a javascript like method in java , is this possible ?

Say , I have a Person class :

public class Person {
 private String name ;
 priva         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-03 12:15

    Look at the google collections library. Look at the transform methods on Iterators and Iterables. That should be able to get you what you want.

提交回复
热议问题