class ShapeInMemLayer extends FeatureSourceRetriever implements VectorLayer {

	public Iterator<?> getElements(Filter filter, int offset, int maxResultSize) throws LayerException {
		List<SimpleFeature> filteredList = new ArrayList<SimpleFeature>();
		for (SimpleFeature feature : features.values()) {
			if (filter.evaluate(feature)) {
				filteredList.add(feature);
				if (filteredList.size() == maxResultSize) {
					break;
				}
			}
		}
		return filteredList.iterator();
	}

}