Here you can find the source of contains(List aList, Object anObj)
public static boolean contains(List aList, Object anObj)
//package com.java2s; import java.util.*; public class Main { /**//from www .j a v a 2 s .c om * Returns whether list contains given object (accepts null list). */ public static boolean contains(List aList, Object anObj) { return aList != null && aList.contains(anObj); } }