On Mon, Jul 9, 2012 at 11:08 PM, Gabriel Roldan <grol...@opengeo.org> wrote: > Alright, thanks all for the comments. > A separate interface was my preference as well but for some reason I > thought it would bring higher hesitation. Glad it doesn't. > So, for the time being I can go with InternalFunction as a marker interface. > I don't quite see the need for a clone like method, as it's purpose is > to easily allow for anonymous inner classes to be used as function and > hence I can't think of a use case where such an object wouldn't be > immutable given there's no FilterFactory that would return a different > implementation or anything like that?
The problem is not the immutability of the object itself, but the one of its parameters. During simplification one might notice one of the parameters is a constant and replace it with it, but if the function itself has to be managed as immutable that simplification would be impossible. This in turn might have runtime consequences, as constant value does not mean no computation, for example, think of calling the cross filtering functions over a layer, if you call them repeatedly they will do a full data access for each call Cheers Andrea -- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 339 8844549 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel