// Textbook fragment 11.10 /** Class specializing the generic merge template to union two sets */ public class UnionMerge extends Merge { protected void aIsLess(E a, PositionList C) { C.addLast(a); // add a } protected void bothAreEqual(E a, E b, PositionList C) { C.addLast(a); // add a (but not its duplicate b) } protected void bIsLess(E b, PositionList C) { C.addLast(b); // add b } }