This implementation is not suitable for use with collections that make use of system resources. As an alterantive please see ResourceFetaureIterator.
290291292293294295296297298
/** * @returns a feature iterator that iterators over all features in the collection */ public SimpleFeatureIterator features() { SimpleFeatureIterator iter = new DelegateSimpleFeatureIterator(this, openIterator()); iterators.add(iter); return iter; }
5051525354555657
* @param featuresArg a colleciton of features. <b>All features must be of the same FeatureType</b> * @param typeArg the Feature type of of the features. */ public CollectionFeatureReader(Collection<SimpleFeature> featuresArg, SimpleFeatureType typeArg) { assert !featuresArg.isEmpty(); this.features = new DelegateSimpleFeatureIterator( featuresArg.iterator() ); this.type = typeArg; }
7576777879808182
* @param featuresArg an of features. <b>All features must be of the same FeatureType</b> */ public CollectionFeatureReader(SimpleFeature[] featuresArg) { assert featuresArg.length > 0; Iterator<SimpleFeature> iterator = Arrays.asList(featuresArg).iterator(); this.features = new DelegateSimpleFeatureIterator( iterator ); type = featuresArg[0].getFeatureType(); }
182183184185186187188189190
* <p> * So when we implement FeatureCollection.iterator() this will work * out of the box. */ public SimpleFeatureIterator features() { SimpleFeatureIterator iterator = new DelegateSimpleFeatureIterator( this, iterator() ); open.add( iterator ); return iterator; }
48495051525354
RetypingIterator retyping = (RetypingIterator) iterator; delegate.close(retyping.delegate); } public SimpleFeatureIterator features() { return new DelegateSimpleFeatureIterator(this, iterator()); }
5253545556575859
public SimpleFeatureIterator features() { return new DelegateSimpleFeatureIterator(this, iterator()); } public void close(SimpleFeatureIterator iterator) { DelegateSimpleFeatureIterator delegate = (DelegateSimpleFeatureIterator) iterator; delegate.close(); }
77787980818283
RemappingIterator remapping = (RemappingIterator) iterator; delegate.close(remapping.delegate); } public SimpleFeatureIterator features() { return new DelegateSimpleFeatureIterator(this, iterator()); }
8182838485868788