static A collectionGet(Collection c, int idx) { if (c == null || idx < 0 || idx >= l(c)) null; if (c instanceof L) ret listGet((L) c, idx); Iterator it = c.iterator(); for (int i = 0; i < idx; i++) if (it.hasNext()) it.next(); else null; ret it.hasNext() ? it.next() : null; }