Java linq equivalent for getting property in list with highest value
<p>Im having a list of results, <code>ArrayList&lt;PlacedObject&gt; result</code>:</p>

<pre><code>for(PlacedObject po : result){

     float[] results = new float[3];

     Location.distanceBetween(lastlocation.getLatitude()
     ,lastlocation.getLongitude()
     ,Double.parseDouble(po.lat)
     ,Double.parseDouble(po.lng) ,
     results);

     po.distance = results[0];
}
</code></pre>

<p>After the <code>po.distance</code> is set, i would like to sort my list by the <code>distance</code> property. In c# i would use linq, but is there any similar solution in java?</p>

<p>Thanks</p>

<hr>

<p>Current solution:</p>

<pre><code>Collections.sort(result, new Comparator&lt;PlacedObject&gt;(){
public int  compare(PlacedObject s1, PlacedObject s2) {
    return (int) (s1.distance - s2.distance);
}
});
</code></pre>
