static <B, A extends B> A addAndReturn(Collection<B> c, A a) { if (c != null) c.add(a); ret a; } static <B, A extends B> A addAndReturn(L<B> c, int idx, A a) { if (c != null) c.add(idx, a); ret a; }