CollectionUtils.firstElement(list);
@Nullable public static <T> T firstElement(@Nullable List<T> list) { if (isEmpty(list)) { return null; } return list.get(0); }
CollectionUtils.lastElement(odList);
@Nullable public static <T> T lastElement(@Nullable List<T> list) { if (isEmpty(list)) { return null; } return list.get(list.size() - 1); }