In this code (see end of this message) I can't get the ff.or() to work
correctly. ff.or() needs a List, so i've changed the type of the match
object but i still got the following error on ff.or() "Type mismatch: cannot
convert from Or to Filter".
???
10x in advance
FeatureCollection grabSelectedNames( Set<String> selectedNames ){
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(
GeoTools.getDefaultHints );
List<Filter> match = new ArrayList<Filter>();
for( String name = selectedNames ){
Filter aMatch = ff.equals( ff.property( "Name"), ff.literal( name ) );
match.add( aMatch );
}
Filter filter = ff.or( match );
return featureSource.getFeatures( filter );
}
--
View this message in context:
http://www.nabble.com/Filter-example-code-error---tf4474357.html#a12757046
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users