705706707708709710711712713714715
set.addAll((Set) col); return set; } else if (col instanceof Bag) { Bag bag = new HashBag(); bag.addAll((Bag) col); return bag; } else { throw new IllegalArgumentException("Cannot clone collections of type: " + col.getClass().getName()); }