static Object first(Object list) { return empty((List) list) ? null : ((List) list).get(0); } static A first(L list) { return empty(list) ? null : list.get(0); } static A first(A[] bla) { ret bla == null || bla.length == 0 ? null : bla[0]; } static A first(Iterable i) { if (i == null) ret null; Iterator it = i.iterator(); ret it.hasNext() ? it.next() : null; }