Java List Last Item isLast(List list, Object o)

Here you can find the source of isLast(List list, Object o)

Description

is Last

License

Apache License

Declaration

public static boolean isLast(List<?> list, Object o) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    public static boolean isLast(List<?> list, Object o) {
        if (list.get(list.size() - 1).equals(o)) {
            return true;
        }//from w w w.j a  va2 s.  c  o  m
        return false;
    }
}

Related

  1. getLastNonNullIndex(final List list)
  2. getLastOrNull(List l)
  3. getLastOrNull(List list)
  4. getLastSectionDays(List sections)
  5. getLastXItems(int lastXItems, List list)
  6. isLast(T object, List list)
  7. isLastIdx(List l, int idx)
  8. isLastIndex(List list, int index)
  9. isLastIndex(List suggestedList, int i)