Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 93900 invoked from network); 30 Aug 2007 10:28:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 10:28:56 -0000 Received: (qmail 53839 invoked by uid 500); 30 Aug 2007 10:28:49 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 53752 invoked by uid 500); 30 Aug 2007 10:28:49 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 53742 invoked by uid 99); 30 Aug 2007 10:28:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 03:28:48 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 10:29:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A922C71418E for ; Thu, 30 Aug 2007 03:28:30 -0700 (PDT) Message-ID: <9149076.1188469710660.JavaMail.jira@brutus> Date: Thu, 30 Aug 2007 03:28:30 -0700 (PDT) From: "John Hunsley (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (COLLECTIONS-263) Extend the MultiHashMap to create an object filter by value of given field In-Reply-To: <17901992.1188425196089.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COLLECTIONS-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Hunsley updated COLLECTIONS-263: ------------------------------------- Attachment: CollectionFilterTest.java Here's a test > Extend the MultiHashMap to create an object filter by value of given field > -------------------------------------------------------------------------- > > Key: COLLECTIONS-263 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-263 > Project: Commons Collections > Issue Type: New Feature > Components: KeyValue, Map > Affects Versions: 3.1, 3.2 > Reporter: John Hunsley > Priority: Minor > Attachments: CollectionFilter.java, CollectionFilterTest.java > > > I purpose extending the MultiHashMap to create an object filter which will filter a given collection of objects by a given field value. > For example: > I have a collection of 5 objects of class X. X has an int field i as shown below: > x1 i = 1 > x2 i = 2 > x3 i = 2 > x4 i = 5 > x5 i = 5 > The extended MultiHashMap will filter those objects by the field i and store each sorted object into the map using the value of the field, i, as the key, such that the resulting MultiHashMap looks as follows: > key | values > 1 | x1 > 2 | x2, x3 > 5 | x4, x5 > I have a class which does this and I find it invaluable in my day to day work. I don't Collections has a similar one. > Kind regards, > John. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.