Over the weekend, I checked in several files that Peter had sent to me some
time ago to include in the Commons-Collections package.

One of the more interesting ones is ListUtils, which provides various
set-theoretic operations (union, intersection, etc.) for java.util.List
implementations.  A couple of things strike me about this:

1. It seems like it would be straightforward to recast this as operations on
Collection implementations, rather than just List implementations.

2. The "sum" method, which computes union(minus(A,B),minus(B,A)) for two
lists A and B, is an operation I've usually seen referred to as the
"symmetric difference" or "[exclusive] disjunction" of two sets.

If another project (Avalon, I assume) is to be a client of collections
ListUtil, I don't want to go breaking the interface willy-nilly, but it
makes sense to me to move toward supporting generalized Collections, and to
rename sum (to disjunction?).  Anyone care to comment?

 - R

Reply via email to