Function Object in Java 
<p>I wanna implement a javascript like method in java , is this possible ?</p>

<p>Say , I have a Person class :</p>

<pre><code>public class Person {
 private String name ;
 private int age ;
 // constructor ,accessors are omitted
}
</code></pre>

<p>And a list with Person objects:</p>

<pre><code>Person p1 = new Person("Jenny",20);
Person p2 = new Person("Kate",22);
List&lt;Person&gt; pList = Arrays.asList(new Person[] {p1,p2});
</code></pre>

<p>I wanna implement a method like this:</p>

<pre><code>modList(pList,new Operation (Person p) {
  incrementAge(Person p) { p.setAge(p.getAge() + 1)};
});
</code></pre>

<p>modList receives two params , one is a list , the other is the "Function object", it loops the list ,and apply this function to every element in the list. In functional programming language,this is easy , I don't know how java do this? Maybe could be done through dynamic proxy, does that have a performance trade off compares to native for loop ?</p>
