commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@eurobell.co.uk>
Subject [Collections][SUBMIT] PredicateUtils [was TypedList]
Date Wed, 01 May 2002 22:38:00 GMT
Hi all,
Please find attached PredicateUtils.

PredicateUtils is a single class that provides predicate (validating)
implementations of all java and commons collections:
Collection
List
Set, SortedSet
Map, SortedMap
Bag, SortedBag

It also provides useful predicate classes:
True
False
And
Or
Not
instanceof

To avoid polluting the commons package with the 18 classes necessary to
achieve this, they are all implemented as static nested classes within
PredicateUtils. This is similar to how synchronized and unmodifiable
collections work in java.util.Collections. All the classes are created and
used by static factory methods, except True and False which are constants.

Feedback welcome on the implementation, and indications of acceptability for
actual inclusion in commons.

Stephen

Mime
View raw message