Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 73320 invoked from network); 1 Dec 2009 23:45:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Dec 2009 23:45:42 -0000 Received: (qmail 65129 invoked by uid 500); 1 Dec 2009 23:45:41 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 65011 invoked by uid 500); 1 Dec 2009 23:45:40 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 65001 invoked by uid 99); 1 Dec 2009 23:45:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 23:45:40 +0000 X-ASF-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of guyr-ml1@burntmail.com designates 70.87.63.122 as permitted sender) Received: from [70.87.63.122] (HELO mx02.burntmail.com) (70.87.63.122) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 23:45:38 +0000 Received: from pool-173-79-57-56.washdc.fios.verizon.net ([173.79.57.56] helo=[127.0.0.1]) by mx02.burntmail.com with esmtpa (Exim 4.63) (envelope-from ) id 1NFcP5-00074q-Sj for user@commons.apache.org; Tue, 01 Dec 2009 17:45:07 -0600 Message-ID: <4B15AA83.3050105@burntmail.com> Date: Tue, 01 Dec 2009 18:45:07 -0500 From: Guy Rouillier User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: user@commons.apache.org Subject: Re: Determine if an object is in a list References: <4B148F62.6070205@burntmail.com> <4B149DCD.4000805@burntmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 091201-1, 12/01/2009), Outbound message X-Antivirus-Status: Clean Brent Worden wrote: > On Mon, Nov 30, 2009 at 10:38 PM, Guy Rouillier wrote: >> James Carman wrote: >>> It's not that hard to create your own predicate that does what you >>> want. We did that for our project. Here are the two classes we use >>> (the first one is a useful superclass for property value-based >>> predicates): >> James, thank you. This is indeed what I was looking for. Mind if I include >> your classes with a feature request? (with attribution, of course.) I think >> this is basic functionality that should be included with Commons >> Collections. >> > > I think commons-beanutils has the predicate you need. > > http://commons.apache.org/beanutils/v1.8.2/apidocs/org/apache/commons/beanutils/BeanPropertyValueEqualsPredicate.html > Brent, thanks, that is exactly what I want! Complete with an example relevant to my need, no less. Interesting that this one predicate is packaged with BeanUtils instead of Collections, since it depends completely on the Collections classes. I would not have thought to look in BeanUtils for a Collections predicate, so I appreciate you pointing it out. -- Guy Rouillier --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org