Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 84545 invoked from network); 4 Mar 2004 22:36:37 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Mar 2004 22:36:37 -0000 Received: (qmail 31016 invoked by uid 500); 4 Mar 2004 22:36:21 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 30949 invoked by uid 500); 4 Mar 2004 22:36:21 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 30935 invoked from network); 4 Mar 2004 22:36:21 -0000 Received: from unknown (HELO ns0018.seagull.nl) (213.53.115.52) by daedalus.apache.org with SMTP; 4 Mar 2004 22:36:21 -0000 Received: from verify.seagullsoftware.com ([10.1.1.17]) by ns0018.seagull.nl with Microsoft SMTPSVC(5.0.2195.6713); Thu, 4 Mar 2004 23:36:26 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [collections] Yipes, I need Regexp based get on a Map Date: Thu, 4 Mar 2004 17:36:19 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [collections] Yipes, I need Regexp based get on a Map Thread-Index: AcQCNl/5rkY8mrJAToOACEJ4Ln8PYgAApy+g From: "Gary Gregory" To: "Jakarta Commons Developers List" X-OriginalArrivalTime: 04 Mar 2004 22:36:26.0476 (UTC) FILETIME=[2116F2C0:01C40239] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This sounds like a very nice grand plan. I support this in spirit at least. Gary > -----Original Message----- > From: Henri Yandell [mailto:bayard@generationjava.com] > Sent: Thursday, March 04, 2004 14:16 > To: Jakarta Commons Developers List > Subject: RE: [collections] Yipes, I need Regexp based get on a Map >=20 >=20 > I suspect the answer is the same as last time. The regexp solution is: >=20 > Merge ORO/Regexp into each other as Commons-Regexp, with both being a > plugin concept > Allow a 1.4 plugin concept for it >=20 > Daniel's grand plan. Maybe we should more actively try to assist him. >=20 > Hen >=20 > On Thu, 4 Mar 2004, Gary Gregory wrote: >=20 > > This sure is interesting and brings up 2 points. (1) This can be done > > with a "decorator" and (2) this brings up the topic again of whether or > > not it would be a good thing to have a [commons-re] like we have a > > [commons-logging], a super thin wrapper that delegates to 1.4 or, in > > this case, [ORO-RE] or [RegExp]. > > > > Gary > > > > > -----Original Message----- > > > From: Mark R. Diggory [mailto:mdiggory@latte.harvard.edu] > > > Sent: Thursday, March 04, 2004 09:06 > > > To: Jakarta Commons Developers List > > > Subject: [collections] Yipes, I need Regexp based get on a Map > > > > > > I'm trying to put together a lookup mechanism that is regular > > expression > > > based. For example > > > > > > > > > Map map =3D ...; > > > > > > Bar bar =3D new Bar(); > > > > > > map.put("^http://foo.bar*",bar); > > > > > > > > > Bar bar2 =3D (Bar)map.get("http://foo.bar/bam"); > > > > > > > > > get("...") would return the bar object. Of course, this could match > > > multiple values, as such get("...") could return the first value > > > encountered or a Collection of all the matches encountered. > > > > > > Collection bars =3D (Collection)map.get("http://foo.bar/bam"); > > > Iterator iter =3D bars.iterator(); > > > Bar bar2 =3D (Bar)iter.next(); > > > > > > Any ideas on how I can throw this together using Commons Collections > > as > > > a basis? I can live with just >=3Dj2sdk1.4 compatibility. Is this > > > something Commons Collections would like to have available? > > > > > > -Mark > > > -- > > > Mark Diggory > > > Software Developer > > > Harvard MIT Data Center > > > http://www.hmdc.harvard.edu > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org