commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <>
Subject [collections] Yipes, I need Regexp based get on a Map
Date Thu, 04 Mar 2004 17:05:38 GMT
I'm trying to put together a lookup mechanism that is regular expression 
based. For example

Map map = ...;

Bar bar = new Bar();


Bar bar2 = (Bar)map.get("");

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 = (Collection)map.get("");
Iterator iter = bars.iterator();
Bar bar2 = (Bar);

Any ideas on how I can throw this together using Commons Collections as 
a basis? I can live with just >=j2sdk1.4 compatibility. Is this 
something Commons Collections would like to have available?

Mark Diggory
Software Developer
Harvard MIT Data Center

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message