title: Geotools nested loop over SimpleFeatureCollection
body: <p>I want to to do a nested loop over a SimpleFeatureCollection. For each point I need to find its neihgbours and process them.</p>
  
  <p>However, SimpleFeatureCollection allows only iterators, but not array access, which makes it impossible (at least seems so) to implement a nested loop. This iterator doesn't have a previous() method, so I can't reset it and use two iterators over the same collection.</p>
  
  <p>So I was wondering if there is any other way to access a feature by its index.</p>
  
  <p>Thanks</p>