Java Utililty Methods List Last Item

List of utility methods to do List Last Item

Description

The list of methods to do List Last Item are organized into topic(s).

Method

TgetLast(List items)
get Last
if (items == null || items.size() == 0)
    return null;
return items.get(items.size() - 1);
TgetLast(List l)
Return the last item of l if it isn't empty, otherwise null.
return getNoExn(l, l.size() - 1);
TgetLast(List list)
get Last
if (isEmpty(list)) {
    return null;
return list.get(list.size() - 1);
TgetLast(List list)
Returns the last element in a list, or null if there is none.
return list == null || list.isEmpty() ? null : list.get(list.size() - 1);
TgetLast(List list)
get Last
return list.get(list.size() - 1);
TgetLast(List list)
Return the last item of the List .
if (list == null || list.isEmpty()) {
    return null;
return list.get(list.size() - 1);
TgetLast(List list)
get Last
if (isEmpty(list)) {
    return null;
return list.get(list.size() - 1);
TgetLast(List list)
get Last
return list.isEmpty() ? null : list.get(list.size() - 1);
TgetLast(List list)
get Last
return list.get(lastIndex(list.size()));
TgetLast(List list)
get Last
if (isEmpty(list)) {
    return null;
return list.get(list.size() - 1);