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
Take a look at the lambdaj project. Here is an example from the project home page:
List personInFamily = asList(new Person("Domenico"), new Person("Mario"), new Person("Irma")); forEach(personInFamily).setLastName("Fusco");