static LinkedHashSet collectUniqueOrdered(Collection c, S field) { new LinkedHashSet set; for (O a : c) { O val = getOpt(a, field); if (val != null) set.add(val); } ret set; }