static L prioritizeList(Collection c, L prioritizer) { new L l; Set set = asSet(c); for (A a : prioritizer) { if (set.contains(a)) { set.remove(a); l.add(a); } } l.addAll(set); ret l; }