Here you can find the source of indexOfIdentity(List
public static <T> int indexOfIdentity(List<T> l, T t)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static <T> int indexOfIdentity(List<T> l, T t) { for (int i = 0; i < l.size(); i++) { if (l.get(i) == t) return i; }//from ww w .j ava 2 s . co m return -1; } }