Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 20377 invoked from network); 2 Apr 2008 19:42:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2008 19:42:07 -0000 Received: (qmail 89444 invoked by uid 500); 2 Apr 2008 19:42:05 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 89384 invoked by uid 500); 2 Apr 2008 19:42:05 -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 89375 invoked by uid 99); 2 Apr 2008 19:42:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 12:42:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 19:41:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9CA25234C0B3 for ; Wed, 2 Apr 2008 12:39:24 -0700 (PDT) Message-ID: <478199367.1207165164636.JavaMail.jira@brutus> Date: Wed, 2 Apr 2008 12:39:24 -0700 (PDT) From: "Rahul Akolkar (JIRA)" To: issues@commons.apache.org Subject: [jira] Reopened: (COLLECTIONS-242) Add Equator interface for more powerful collections 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-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rahul Akolkar reopened COLLECTIONS-242: --------------------------------------- Could you please fix the svn props for files added and make required changes to your svn client's config? See: http://markmail.org/message/m65kwvj2mrr6zszf > Add Equator interface for more powerful collections > --------------------------------------------------- > > Key: COLLECTIONS-242 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-242 > Project: Commons Collections > Issue Type: Improvement > Components: Comparator > Reporter: Stephen Kestle > Assignee: Stephen Kestle > Fix For: Generics > > > Java has Comparable and Comparator to compare objects, and objects have an equals() method. But there is no interface for when an object has multiple ways of being equal. > e.g.: an database object that has a name, code and a value. Equality could be based on: > * database id > * code > * name and code > * case-insensitive name > When extended to collections, this allows us to search for specific > values (with an EqualsPredicate that takes an Equator), and implement > Maps and Sets that use specific equators to determine uniqueness. > I propose that it has two methods: > boolean equate(); > int hash(); > I shall upload some files when I next get some time. > NB: This ticket is a summary of the email conversation begun on 5 Jan 2007: "equator interface" (http://archives.devshed.com/forums/java-118/equator-interface-2126195.html). Stephen C made reference there to creating a FlexiMap, but in my mind, that's additional to this issue (this interface still needs to be created to be able to stand alone). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.