/** Class specializing the generic merge template to intersect two sets */ public class IntersectMerger extends Merger { protected void aIsLess(Object a, Sequence C) { } protected void bothAreEqual(Object a, Object b, Sequence C) { C.insertLast(a); // add a (but not its duplicate b) } protected void bIsLess(Object b, Sequence C) { } }