static Object first(Object list) { return ((List) list).isEmpty() ? null : ((List) list).get(0); } static A first(L list) { return list.isEmpty() ? 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; }