Re: [collections] Notifying/Observable design choices

2003-06-17 Thread Stephen Colebourne
From: "Michael Heuer" <[EMAIL PROTECTED]> > On Sat, 7 Jun 2003, Stephen Colebourne wrote: > > > Proposal #3 (Colebourne - merged from #1 and #2): > > -- > > public boolean addAll(int index, Collection c){ > > if (preAddAll(index, c)) { > > result = backingList.addAll(i

Re: [collections] Notifying/Observable design choices

2003-06-12 Thread Michael Heuer
On Sat, 7 Jun 2003, Stephen Colebourne wrote: > Proposal #3 (Colebourne - merged from #1 and #2): > -- > public boolean addAll(int index, Collection c){ > if (preAddAll(index, c)) { > result = backingList.addAll(index, c); > postAddAll(index, c, result); > } >

Re: [collections] Notifying/Observable design choices

2003-06-11 Thread Neil O'Toole
> However, say you have a > collection: > > { b, a, b, a, c } > > and you do: > > coll.removeAll( {a, c} ); > > This removes all the a's and c's, i.e. items with indices 1, 3 and 4. > However, the value of changeIndex would presumably be 0, and the should read >> would presumably be 1 ---

Re: [collections] Notifying/Observable design choices

2003-06-07 Thread _matthewHawthorne
I haven't been involved in the discussion, but on first glance, I give Proposal #3 a +1... since it seems to allow for flexibility in event data, exception handling, and performance by creating subclasses. On Sat, 2003-06-07 at 10:07, Stephen Colebourne wrote: > Three possible designs (so far): >

[collections] Notifying/Observable design choices

2003-06-07 Thread Stephen Colebourne
Three possible designs (so far): Proposal #1 (Heuer/MailingList) public boolean addAll(int index, Collection coll) { int oldSize = backingList.size(); boolean returnVal = backingList.addAll(index, coll); int newSize = backingList.size(); if (returnVal) {