Getting a view of a List based on a property
<p>I need to write a method that returns a view of a List(java.util.List). The returned view should contain only those elements in the input List that returns true when tested with the isSuccessful() method. </p>

<pre><code>List&lt;Entity&gt; getSuccessfulEntities(List&lt;Entity&gt; entities)
{
  //Return a List view of entities, each element of which returns true for isSuccessful(entity)
}
</code></pre>

<p>I have looked at Collections and List API but couldn't find any facility for this. Any out of box thought?</p>
