Here you can find the source of isLast(List> list, Object o)
public static boolean isLast(List<?> list, Object o)
//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; } }