* @return the item at the specified index.
* @throws IndexOutOfBoundsException
* if index is not between 0 and size
*/
public SimpleFeature get(int position) {
FeatureId fid = index.get(position);
if( collection instanceof RandomFeatureAccess){
RandomFeatureAccess random = (RandomFeatureAccess) collection;
return random.getFeatureMember( fid.getID() );
}
SimpleFeatureIterator it = collection.features();
try {
while(it.hasNext()) {
SimpleFeature feature = (SimpleFeature) it.next();