title: How can I extract values from a list of objects based on a property of these objects?
body: <p>I'd like to find objects in a list based on having a certain property.</p>
  
  <p>For example, say I have a list of objects of this class:</p>
  
  <pre><code>class Person {
      private String name;
      private String id;
  }
  </code></pre>
  
  <p>I know that I can get <em>all</em> of the names of people in the list by using:</p>
  
  <pre><code>Collection&lt;String&gt; names = CollectionUtils.collect(
      personList,
      TransformerUtils.invokerTransformer("getName"));  
  </code></pre>
  
  <p>but what I want to do is get a list of the <code>Person</code> objects whose name is, for example, <code>"Nick"</code>. I don't have Java 8.</p>