commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <>
Subject Re: [collections] predicate algebra
Date Mon, 06 Jun 2005 23:00:55 GMT
This was suggested a long time ago, but never pursued. Personally, I 
dislike calling static methods on instances just because it makes the 
code 'read more easily'.

The [collections] functor code (including predicates) is intended to be 
a useful default set of classes for using predicates, not a 
full-featured functor system. The dormant [functor] project in the 
sandbox tackles that goal.

Thus as present I would be -1 to adding static methods as you propose.

Stephen wrote:
> Would it make implementation sense for predicates to extend a common
> class (ConcretePredicate, PredicateImpl or some such)?
> Then one could conceivably write eg "predicate1.and(predicate2)" 
> in place of "new AndPredicate(predicate1,predicate2)".
> and other relational operators, eg andNot defined in the root class.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message