Here you can find the source of identityContains(Object o, List> list)
public static boolean identityContains(Object o, List<?> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**//from w w w . ja v a 2s . com * Check if o is in list with == operator */ public static boolean identityContains(Object o, List<?> list) { for (Object l : list) { if (o == l) return true; } return false; } }