[collections] added #unmodifiableXXXCopy and static #removeAll, #retainAll implementations

2004-12-11 Thread Neil O'Toole
I've just committed a few utility/convenience methods as below: ListUtils: List removeAll(Collection collection, Collection remove) public static List retainAll(Collection collection, Collection retain) public static List unmodifiableListCopy(Collection collection) CollectionUtils: Same as ListUt

RE: [lang] Mutables [was new StringBuffer.. what to call it]

2003-12-11 Thread Neil O'Toole
I'm +1 on adding these classes, but I wholeheartedly agree with Gary's point below. The class described by Stephen is a StringHolder, and nothing else ;) >neil --- Gary Gregory <[EMAIL PROTECTED]> wrote: > The word "Mutable" seems to carry quite a bit of baggage from all > POVs! :-) > When I thin

RE: [collections] pairs package name

2003-12-05 Thread Neil O'Toole
+1 - definitely the best so far. --- ASHWIN Suresh <[EMAIL PROTECTED]> wrote: > > > > I'll suggest keyvalue to positively describe the package (rather > than > > negatively). That name allows MapEntry, KeyValue and MultiKey. > > > > (data/holders/elements all seem a bit vague) > > > > Stephen

Re: [collections][PROPOSAL] Remove Observable subpackage

2003-11-28 Thread Neil O'Toole
the Observer pattern in my eyes. > Notifying is > OK > > > as a name, and possibly clearer in intent, however I'm not sure > that a > > > commons component named [notifying] quite sounds right. [notify] > maybe, > but > > > then thats not quite r

Re: [collections][PROPOSAL] Remove Observable subpackage

2003-11-26 Thread Neil O'Toole
--- Stephen Colebourne <[EMAIL PROTECTED]> wrote: > We've had all positives so far. I'm going to take this as agreed and > move > the code to a new sandbox project. I reckon [observable] is probably > the > best name, although I'm open to offers. I don't have strongly held opinions on the naming,

Re: [collections][PROPOSAL] Remove Observable subpackage

2003-11-24 Thread Neil O'Toole
--- Henri Yandell <[EMAIL PROTECTED]> wrote: > > I'm +1 on it moving out. Who is the community as far as that piece of > code > is concerned? Is it just a Stephen Colebourne work, ie) moving to > joda > makes good sense, or something by more people? Stephen, Michael Hauer, and myself are the thr

Re: [collections][PROPOSAL] Remove Observable subpackage

2003-11-24 Thread Neil O'Toole
--- __matthewHawthorne <[EMAIL PROTECTED]> wrote: > I think it's a good idea to remove it. At this point, [collections] > is > so big that I'm +1 for removing all that we can. I frequently get > OutOfMemoryExceptions when doing the maven build due to the size > (from > the statcvs and linkche

Re: [collections] Proposal - Subpackages

2003-11-16 Thread Neil O'Toole
+1 on the package hierarchy. I especially agree with: >> 3) The distinction between a decorator and a non-decorator is too fine for me, and non-obvious to the user. > I think I would support a move of the Observable classes to a separate project, but I feel that moves the release that much furth

Re: [collections][VOTE] Add jar for testframework

2003-10-03 Thread Neil O'Toole
+1 on that. --- Stephen Colebourne <[EMAIL PROTECTED]> wrote: > Formal bit, so all is clear > > Commons-collections contains a testing framework that enables the > collections interfaces, such as Map, List and Set, to be tested. This > framework has proved very useful, and has been requested

Re: [collections] Map.Entry and KeyValue

2003-09-29 Thread Neil O'Toole
pache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.commons.collections.pairs; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Entry point for key-value

Re: [collections] Map.Entry and KeyValue

2003-09-24 Thread Neil O'Toole
org.apache.commons.collections; import java.util.Map; /** * A mutable key-value pair. Note that a KeyValuePair instance * may not contain itself as a key or value. * * @since Commons Collections 3.0 * @version $Revision: $ * * @author mailto:[EMAIL PROTECTED]">James Strachan

Re: [collections] Map.Entry and KeyValue

2003-09-24 Thread Neil O'Toole
t; > - Original Message - > From: "Neil O'Toole" <[EMAIL PROTECTED]> > > > My suggested solution is to add a class "KeyValue.java" > containing > > > the code from DefaultMapEntry, but not implementing Map.Entry. > > > Defa

Re: [collections] Map.Entry and KeyValue

2003-09-22 Thread Neil O'Toole
eclared final - thoughts on this??. - KeyValuePair has a toString() method. Unless there are objections, anyone want to add this to CVS? Neil --- Neil O'Toole <[EMAIL PROTECTED]> wrote: > > > ** I had a swift look through [collections] and [lang], and > didn't > &g

Re: [collections] submission: KeyValueRecord

2003-09-21 Thread Neil O'Toole
e the code, so I'll be looking into this next chance I get. Neil > - Original Message - > From: "Neil O'Toole" <[EMAIL PROTECTED]> > > > 'Record' confused me and made me think of databases. Is > > > KeyValueHistory a better name

[collections] Map.Entry and KeyValue

2003-09-21 Thread Neil O'Toole
> > ** I had a swift look through [collections] and [lang], and didn't > see > > a simple KeyValuePair implementation... Have I missed this > somewhere? > > DefaultMapEntry IIRC is the simple Map.Entry impl. > Stephen > Although one (including my good self!) might initially think that a key-value

Re: [collections] submission: KeyValueRecord

2003-09-20 Thread Neil O'Toole
ious-value} triplet. This class is frequently used * in conjunction with Map.Entry. A constructor is provided to create * a KeyValueRecord from a Map.Entry, and the [EMAIL PROTECTED] #asMapEntry} * method can be used to view an object of this class as a Map.Entry. * Note that it is not possible

[collections] submission: KeyValueRecord

2003-09-20 Thread Neil O'Toole
from a Map.Entry, and the [EMAIL PROTECTED] #asMapEntry} * method can be used to view an object of this class as a Map.Entry. * Note that it is not possible for KeyValueRecord to implement the Map.Entry * interface as the #equals implementations are not compatible. * * * * @

Subject: [collections][lang] question on javadoc guidelines wrt subclass behaviour

2003-08-24 Thread Neil O'Toole
this question might belong on a more general java list, but since i came across the issue while doing stuff for collections, you guys are going to have to suffer ;) In brief, how should one javadoc when method behaviour differs (or is more specific) in a subclass, even though that method is not o

Re: [collections] NotifyingCollections - the wrapping problem

2003-08-18 Thread Neil O'Toole
Guys, Sorry I haven't had a chance to read this thread - I've been on the road since thursday. I'll be back in the real world tomorrow and i'll get back to you all then. - Neil --- Stephen Colebourne <[EMAIL PROTECTED]> wrote: > From: "Chuck Daniels" <[EMAIL PROTECTED]> > > > sc.add(""); > >

Re: [collections] Proposal for a Timeout Affected Priority Queue

2003-07-30 Thread Neil O'Toole
--- Cheung Lo <[EMAIL PROTECTED]> wrote: > Proposal for a Timeout Affected Priority Queue > I would like to propose the adoption of the TapQueue into the > collections > packages but need feedback on the following issues: > > 1. Has anyone else had a need for a timeout affected priority queue? >

[collections] NotifyingCollections - capturing rich non-uniform data

2003-07-29 Thread Neil O'Toole
[stephen] > My goals for [collections] is to add something small and simple that doesn't prevent a user adding something more complex. [michael] > I think I would prefer multiple listener interfaces and a simple event to a single listener interface and either a hierarchy of event classes or a type

RE: [io][vote] FileUtils: decision on style

2003-07-29 Thread Neil O'Toole
> At first glance I don't really see the `need to override > behavior' > argument -- if a user doesn't like the way a static method is > implemented, can't they just implement their own in a separate class? > Absolutely. I don't see any reason why utility methods should be overridden. If a method

Re: [collections] NotifyingCollections update

2003-07-25 Thread Neil O'Toole
--- Neil O'Toole <[EMAIL PROTECTED]> wrote: > Latest build and docs for NotifyingCollections available from: > > http://nettool.sourceforge.net/nc/ > > The significant update is that NotifyingList no longer performs > explicit range checks (and thus should

[collections] NotifyingCollections update

2003-07-25 Thread Neil O'Toole
Latest build and docs for NotifyingCollections available from: http://nettool.sourceforge.net/nc/ The significant update is that NotifyingList no longer performs explicit range checks (and thus should now be suitable for use with LazyList - an informal indicates that it does indeed work). - Nei

[collections] NotifyingCollections design

2003-07-25 Thread Neil O'Toole
This email gives an overview of the design of NotifyingCollections, and addresses all of the points raised by Stephen in earlier emails. The NotifyingCollections code is too large to post to the list, but can be accessed at http://nettool.sourceforge.net/nc/ Design Overview --- Noti

Re: [collections][submission] NotifyingCollections

2003-07-24 Thread Neil O'Toole
tives: > Simple > Extendable by subclassing Handler/Event > Can swallow method calls without an exception if desired > Can cope with invalid boolean 'collection changed' flags if desired > > Negatives: > One Handler created per decorator > Event instance not sha

Re: [collections][submission] NotifyingCollections

2003-07-24 Thread Neil O'Toole
--- Stephen Colebourne <[EMAIL PROTECTED]> wrote: > I haven't forgotten this, and will release some code I've been > working on > for comparison soon. > Stephen Great, do you have a rough idea when you'll have that code out? N. > ----- Original Message

[collections][submission] NotifyingCollections

2003-07-20 Thread Neil O'Toole
This is a much updated submission of the event-based notifying decorator mechanism for collections, as discussed on the list last month. The package is too big to be posted to this list. The source, javadoc, and pre-built jar can be downloaded from: http://nettool.sourceforge.net/nc The javado

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 ---

[collections][lang] submission: NotifyingCollections (observable) / o.a.c.l.event

2003-06-05 Thread Neil O'Toole
part 3 - test cases test-org.apache.commons.collections.notifying.zip Description: test-org.apache.commons.collections.notifying.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[collections][lang] submission: NotifyingCollections (observable) / o.a.c.l.event

2003-06-05 Thread Neil O'Toole
part 2 src-org.apache.commons.collections.notifying.detailed.zip Description: src-org.apache.commons.collections.notifying.detailed.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[collections][lang] submission: NotifyingCollections (observable) / o.a.c.l.event

2003-06-05 Thread Neil O'Toole
You go away on vacation for two weeks and it's all change around here. I read with interest the thread on observable collections, an implementation of which I have been working on for some time. Attached is a submission for a new package, org.apache.commons.collections.notifying. This package ("No

Re: [lang] What's left for 2.0 (WAS: [collections] Primitive collecti ons (was Entities and LGPL))

2003-06-04 Thread Neil O'Toole
> Would it make sense to layer [collections] on top of [lang], in the > same > manner that Xalan is layered on and includes Xerces in it's > distribution? > The most basic of collection-like things could be in [lang] for > example; I > am not fond of this either but what are our options? Don't thr

RE: [collections] XxxUtils inner classes

2003-04-02 Thread Neil O'Toole
btw, I grant that naming a class "Utils" is probably asking for trouble. But this was way back when, before we realised how many classes there were going to be out there ;) That being said, how many classes are there named "Document"? --- Neil O'Toole <[EMAIL PRO

RE: [collections] XxxUtils inner classes

2003-04-02 Thread Neil O'Toole
I couldn't agree more with Craig. I have come across the exact situation he describes, where there exists classes: com.foo.a.ClassA com.foo.a.Utils org.bar.ClassB and you have code: // MyClass.java package com.acme.c; import com.foo.a.*; import org.bar.b.*; [...] public void myMeth

Re: [collections] [patch] changes for ArrayListIterator was: Re: [collections] private member access in o.a.c.collections.iterators

2002-12-11 Thread Neil O'Toole
Hi Stephen, Rich, > Would it be possible for you to refactor to remove > UnmodifiableArrayListIterator? Thanks ;-) No prob. Please find attached updated patches & files as per your suggestion. The comments for each file are as per the previous message except: - ArrayIterator.patch : changes as b

[collections] [patch] changes for ArrayListIterator was: Re: [collections] private member access in o.a.c.collections.iterators

2002-12-10 Thread Neil O'Toole
;-) > Stephen > > - Original Message - > From: "Neil O'Toole" <[EMAIL PROTECTED]> > To: "Jakarta Commons Developers List" > <[EMAIL PROTECTED]> > Sent: Friday, December 06, 2002 9:51 PM > Subject: Re: [collections] private member

[collections] [patch] changes for ArrayListIterator was: Re: [collections] private member access in o.a.c.collections.iterators

2002-12-09 Thread Neil O'Toole
;-) > Stephen > > - Original Message - > From: "Neil O'Toole" <[EMAIL PROTECTED]> > To: "Jakarta Commons Developers List" > <[EMAIL PROTECTED]> > Sent: Friday, December 06, 2002 9:51 PM > Subject: Re: [collections] private member

Re: [collections] private member access in o.a.c.collections.iterators

2002-12-06 Thread Neil O'Toole
would you want to do this, as it > prevents > > subclassing? A particular case: I wanted to created an > > ArrayListIterator that subclasses ArrayIterator and implements the > > ListIterator interface. With protected member access it is a simple > and > > elegant imple

[collections] private member access in o.a.c.collections.iterators

2002-12-05 Thread Neil O'Toole
face. With protected member access it is a simple and elegant implementation to subclass ArrayIterator. Thoughts on the matter? - Neil O'Toole -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>