@Test public void testDelegateVisitor() throws IOException { FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(); UniqueVisitor visitor = new UniqueVisitor(ff.property("test")); FeatureCollection mock = EasyMock.createMock(FeatureCollection.class); mock.accepts(visitor, null); EasyMock.expectLastCall(); EasyMock.replay(mock); DecoratingFeatureCollection decorator = new DecoratingFeatureCollection<FeatureType, Feature>(mock) { @Override protected boolean canDelegate(FeatureVisitor visitor) { return true; } }; decorator.accepts(visitor, null); EasyMock.verify(mock); }
public void accepts( org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException { if (canDelegate(visitor)) { delegate.accepts(visitor, progress); } else { DataUtilities.visit(this, visitor, progress); } }
DecoratingFeatureCollection implements FeatureCollection<T, F> { public void accepts( org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException { if (canDelegate(visitor)) { delegate.accepts(visitor, progress); } else { DataUtilities.visit(this, visitor, progress); } } }
DecoratingFeatureCollection implements FeatureCollection<T, F> { public void accepts( org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException { if (canDelegate(visitor)) { delegate.accepts(visitor, progress); } else { DataUtilities.visit(this, visitor, progress); } } protected  DecoratingFeatureCollection(FeatureCollection<T, F> delegate); }
DecoratingFeatureCollection implements FeatureCollection<T, F> { public void accepts( org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException { if (canDelegate(visitor)) { delegate.accepts(visitor, progress); } else { DataUtilities.visit(this, visitor, progress); } } protected  DecoratingFeatureCollection(FeatureCollection<T, F> delegate); void accepts(
            org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress); boolean contains(Object o); boolean containsAll(Collection<?> c); boolean equals(Object o); FeatureIterator<F> features(); ReferencedEnvelope getBounds(); T getSchema(); int hashCode(); boolean isEmpty(); int size(); FeatureCollection<T, F> sort(SortBy order); FeatureCollection<T, F> subCollection(Filter filter); Object[] toArray(); O[] toArray(O[] a); String getID(); }
DecoratingFeatureCollection implements FeatureCollection<T, F> { public void accepts( org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress) throws IOException { if (canDelegate(visitor)) { delegate.accepts(visitor, progress); } else { DataUtilities.visit(this, visitor, progress); } } protected  DecoratingFeatureCollection(FeatureCollection<T, F> delegate); void accepts(
            org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress); boolean contains(Object o); boolean containsAll(Collection<?> c); boolean equals(Object o); FeatureIterator<F> features(); ReferencedEnvelope getBounds(); T getSchema(); int hashCode(); boolean isEmpty(); int size(); FeatureCollection<T, F> sort(SortBy order); FeatureCollection<T, F> subCollection(Filter filter); Object[] toArray(); O[] toArray(O[] a); String getID();  }