commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [collections] Element of Predicate?
Date Thu, 09 Feb 2006 23:01:09 GMT
We don't have such a thing, but IMHO, nor can we until functor gets 
properly broken out (due to jar size).

Stephen

James Carman wrote:
> To be more precise:
> 
> public class ElementOfPredicate implements Predicate 
> {
>   private final Collection c;
> 
>   public ElementOfPredicate( Collection c )
>   {
>     this.c = c;
>   }
> 
>   public boolean evaluate( Object o )
>   {
>     return c.contains( o );
>   }
> }
> 
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Tuesday, February 07, 2006 11:21 AM
> To: 'Jakarta Commons Developers List'
> Subject: [collections] Element of Predicate?
> 
> I couldn't find it, but do we have an ElementOfPredicate somewhere.
> Basically, it'd return true if the object is an element of a collection
> that's passed into the constructor?
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message