[Jakarta-commons Wiki] Update of "Collections Questions" by RobertBurrellDonkin

2005-11-28 Thread Apache Wiki
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification. The following page has been changed by RobertBurrellDonkin: http://wiki.apache.org/jakarta-commons/Collections_Questions ---

[Jakarta-commons Wiki] Update of "Collections Questions" by MattHall

2005-05-23 Thread Apache Wiki
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification. The following page has been changed by MattHall: http://wiki.apache.org/jakarta-commons/Collections_Questions --

[Jakarta Commons Wiki] Updated: Collections Questions

2004-08-24 Thread commons-dev
Date: 2004-08-24T07:03:24 Editor: CaseyHelbling <[EMAIL PROTECTED]> Wiki: Jakarta Commons Wiki Page: Collections Questions URL: http://wiki.apache.org/jakarta-commons/Collections Questions no comment Chan

[Jakarta Commons Wiki] Updated: Collections Questions

2004-08-23 Thread commons-dev
Date: 2004-08-23T13:03:36 Editor: 217.43.244.60 <> Wiki: Jakarta Commons Wiki Page: Collections Questions URL: http://wiki.apache.org/jakarta-commons/Collections Questions no comment Chan

[Jakarta Commons Wiki] Updated: Collections Questions

2004-08-23 Thread commons-dev
Date: 2004-08-23T13:03:15 Editor: 217.43.244.60 <> Wiki: Jakarta Commons Wiki Page: Collections Questions URL: http://wiki.apache.org/jakarta-commons/Collections Questions Answer question Chan

Re: [collections] Questions....

2003-08-21 Thread Rich Dougherty
On Wed, Aug 20, 2003 at 10:25:39AM -0400, Henri Yandell wrote: > > > FastXxx classes say that they are not cross-platform, but in no way > > > discuss which platforms they are targetted at. This makes these classes > > > useless except to the authors. > > IIRC, nobody can ever answer this question.

Re: [collections] Questions....

2003-08-20 Thread Takuya Murata
I personally have a problem with the use of the class name Singleton. Singleton is a well known pattern for only having one instance of an Object in an environment, this class does not achive this. I would think a name likeSingleEntryIterator/TrivialIterator/MonoIterator or some such would be a

Re: [collections] Questions....

2003-08-20 Thread Takuya Murata
Agreed. Trying to 'package' defensively :) SingletonListIterator could become a static on SingletonIterator: SingletonIterator.asListIterator(Object) or some such. Mainly just trying to make Collections easier to grokk. I hate tricky solution. Compared with this, having two SingletonIterator and

RE: [collections] Questions....

2003-08-20 Thread Hope, Matthew
Subject: RE: [collections] Questions > > > > -Original Message- > > From: Takuya Murata [mailto:[EMAIL PROTECTED] > > Sent: 20 August 2003 12:14 > > To: Jakarta Commons Developers List > > Subject: Re: [collections] Questions > > > > c

Re: [collections] Questions....

2003-08-20 Thread Henri Yandell
On Tue, 19 Aug 2003, Stephen Colebourne wrote: > From: "Henri Yandell" <[EMAIL PROTECTED]> > > Firstly, SingletonIterator and SingletonListIterator seem quite similar. > > Apart from the extra type of 'ListIterator', it appears that a > > SingletonListIterator can do the job of a SingletonIterat

RE: [collections] Questions....

2003-08-20 Thread Hope, Matthew
> -Original Message- > From: Takuya Murata [mailto:[EMAIL PROTECTED] > Sent: 20 August 2003 12:14 > To: Jakarta Commons Developers List > Subject: Re: [collections] Questions > > class Singleton implements List { > } > > ResetableIterator i = new Singl

RE: [collections] Questions....

2003-08-20 Thread Hope, Matthew
> -Original Message- > From: Takuya Murata [mailto:[EMAIL PROTECTED] > Sent: 20 August 2003 11:55 > To: Jakarta Commons Developers List > Subject: Re: [collections] Questions > > A tricky situation is > > class A { >public void method (Iterat

Re: [collections] Questions....

2003-08-20 Thread Takuya Murata
this sounds hugely dangerous - the javadocs for List#equals(Object) for example stipulate: Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two

Re: [collections] Questions....

2003-08-20 Thread Takuya Murata
On Wednesday, August 20, 2003, at 12:41 PM, Henri Yandell wrote: On Wed, 20 Aug 2003, Takuya Murata wrote: Yes, this is in line with your proposal; we can use SingletonListIterator for both Iterator and ListIterator. I think the problem of this solution is users probably expect SingletonIterat

RE: [collections] Questions....

2003-08-20 Thread Hope, Matthew
> -Original Message- > From: Takuya Murata [mailto:[EMAIL PROTECTED] > Sent: 20 August 2003 04:29 > To: Jakarta Commons Developers List > Subject: Re: [collections] Questions > > > Hi, > > So the question is do we really need SingletonIterator

Re: [collections] Questions....

2003-08-20 Thread Stephen Colebourne
From: "Henri Yandell" <[EMAIL PROTECTED]> > Firstly, SingletonIterator and SingletonListIterator seem quite similar. > Apart from the extra type of 'ListIterator', it appears that a > SingletonListIterator can do the job of a SingletonIterator in all jobs. > Could just remove SingleIterator. True,

Re: [collections] Questions....

2003-08-19 Thread Rich Dougherty
So the question is do we really need SingletonIterator and such. If we want to eliminate the number of methods or classes, then what about one class for all of collections or iterators? I suppose the use of singleton methods and classes is almost always to provide an object matching a data type

Re: [collections] Questions....

2003-08-19 Thread __matthewHawthorne
I think that the elimination of _unnecessary_ methods and classes is a noble goal. For example, In the SingletonIterator vs. SingletonListIterator situation, as long as the logic to implement the extra methods specified by java.util.ListIterator does not cause significant performance overhead, i

Re: [collections] Questions....

2003-08-19 Thread Henri Yandell
On Wed, 20 Aug 2003, Takuya Murata wrote: > Yes, this is in line with your proposal; we can use > SingletonListIterator for both Iterator and ListIterator. I think the > problem of this solution is users probably expect SingletonIterator > intuitively and might be puzzled why there is no such.

Re: [collections] Questions....

2003-08-19 Thread Takuya Murata
Hi, So the question is do we really need SingletonIterator and such. If we want to eliminate the number of methods or classes, then what about one class for all of collections or iterators? I suppose the use of singleton methods and classes is almost always to provide an object matching a data

Re: [collections] Questions....

2003-08-19 Thread Henri Yandell
While this is a good question, it's not the actual problem I'm trying to point out. SingletonIterator or singletonIterator() is a redundant method in 99% of its usage. Only if someone has if(instanceof ListIterator) {.. } else if(instanceof Iterator) would it change the funcationality. Using XxxU

Re: [collections] Questions....

2003-08-19 Thread Takuya Murata
Hello, Firstly, SingletonIterator and SingletonListIterator seem quite similar. Apart from the extra type of 'ListIterator', it appears that a SingletonListIterator can do the job of a SingletonIterator in all jobs. Could just remove SingleIterator. I was thinking can we eliminate those classes

[collections] Questions....

2003-08-18 Thread Henri Yandell
Few questions. Firstly, SingletonIterator and SingletonListIterator seem quite similar. Apart from the extra type of 'ListIterator', it appears that a SingletonListIterator can do the job of a SingletonIterator in all jobs. Could just remove SingleIterator. Second question. What's ListIteratorWr