commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@eurobell.co.uk>
Subject Re: [collections] Naming of collection wrappers classes (PredicateUtils et al)
Date Mon, 20 May 2002 19:29:52 GMT
From: Jack, Paul <pjack@sfaf.org>
> > Thus I propose splitting PredicateUtils in two:
> > PredicateCollections  (#1 above)
> > PredicateUtils  (#2 above)
>
> Well, that still leaves us with the problem that PredicateUtils
> doesn't contain all of the predicate utils.  Other ideas:
>
> 1.  Move PredicateUtils.and, .or, .not, .instanceof, .TRUE and
> .FALSE into CollectionUtils; rename PredicateUtils to
> PredicateCollections.

Possible. I was thinking along the lines of PredicateUtils containing
predicate implementations however, not the code that uses the predicates.
CollectionUtils uses predicates, but so does FilterIterator and probably
other classes. I'm trying to separate the predicates from those things that
use the predicates.

> 2.  Duplicate the static predicate methods in CollectionUtils
> in PredicateUtils, so that one class's static methods invoke
> the other's.

I dislike this. I find duplication like this tends to confuse.

> Also, I noticed that the inner class for the instanceof predicate
> was declared public, whereas the other inner classes were declared
> private.  Was that deliberate?

No, my mistake. There should also be a 'not null' predicate as this is a
common test for collections.

Stephen


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


Mime
View raw message