static <A> Map<A> consequentsMap(Collection<A> c) { ret consequentsMap(new Map, c); } static <A> Map<A> consequentsMap(Map<A> map, Iterable<A> c) { A last = null; for (A a : unnull(c)) { if (a == null) continue; if (last != null) map.put(last, a); last = a; } ret map; }