public static <A> Collection<A> clone(Collection<A> col) {
        ArrayList<A> list = new ArrayList<A>(col.size());
        for (A a : col) {
            list.add(a);
        }
        return list;
    }