Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-05-01 Thread Larry Becker
I'm not trying to say that there on only one right way to do things, however the basic JUMP design is a very good one, and consistency in return values for the methods of a class is not necessarily something to strive for. In the case of getFeatures(), the main accessor method of the class, it is

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-05-01 Thread Larry Becker
Stefan is correct that Lists have more methods, although technically Collection is an interface not a super class. The List interface is a superset of the Collection interface. Notably it adds the important positional access methods. Of course, Lists also have order which all Collections do not

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-05-01 Thread Stefan Steiniger
mhm.. to my knowledge the collection is the super class, thus lists have more methods. so you can not cast from collection to list but the other way around??? stefan Sunburned Surveyor schrieb: > Stefan, > > I'm a little confused. A List is an implemenation of the Collection > interface. I tho

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-04-30 Thread Sunburned Surveyor
Stefan, I'm a little confused. A List is an implemenation of the Collection interface. I thought it would make more sense for the FeatureCollection interface to return an implementation of Collection, rather than a List specifically, becuase it gives the programmer implementing the interface more

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-04-30 Thread Stefan Steiniger
although you already respond with an ok. i just want underline what Martin said, because a list has much more features. and i guess alsmost everybody uses these nice features? But It may be possible to add a second method - if one prefers to get a collection :) stefan Sunburned Surveyor schrie

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-04-27 Thread Sunburned Surveyor
O.K. SS On 4/27/07, Martin Davis <[EMAIL PROTECTED]> wrote: SS, It's easy to change the FC interface methods return value from List to Collection n the JUMP CVS codebase. But you risk breaking a lot of external plugins which have been coded to the current interface. I don't really see a pre

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-04-27 Thread Martin Davis
SS, It's easy to change the FC interface methods return value from List to Collection n the JUMP CVS codebase. But you risk breaking a lot of external plugins which have been coded to the current interface. I don't really see a pressing need to do this, so I would vote against it. Sunburned

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-04-27 Thread Sunburned Surveyor
Martin, This makes perfect sense. Thank you for the clarification. If no one has an objection I will make a not of it in the Javadoc API. I might also see if I can refactor the FeatureCollection interface to use java.util.Collection on the other two methods. This will give me some practice with R

Re: [JPP-Devel] Questions on FeatureCollection Interface

2007-04-27 Thread Martin Davis
The fact that getFeatures and query return a List is probably an undesirable widening of the API. For maximum flexibility for implementors, they should all return Collection. This was just an oversight in the original design. The reason that remove(Envelope) returns a collection of the remove