Martin Desruisseaux wrote
> I'm not well aware of the roadmap for styling, so my words may not be 
> pertinent. 
> But as far as consistency is concerned in names of methods returning a 
> collection, I think that it depends if the collection is intented to be 
> "live" 
> or immutable.
>   
Agreed.
> Immutable collections
> ---------------------
> List<Foo> getRules(); // Returns an immutable list
> void setRules(List<Foo>); // *Copy* the content of this list.
>
>
> Live collections
> ----------------
> List<Foo> rules();  // Returns a *mutable* collection.
>
> *No* setters. For setting all rules, use the following idiom:
>
> rules().clear();
> rules.addAll(rules);
>   
I am clear on this as well; so it is down to Johann and if he wants the 
styles to be mutable or not. Last time he talked about it he was going 
to make them immutable (and more like Filter and Expression).
> So in short the question is: do you want to follow Java Beans pattern or Java 
> collection framework pattern?
>   
I am in complete agreement with your breakdown; it is consistent etc... 
so lets ask Johann what he wants to do and name the method accordingly.

Jody

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to