Here you can find the source of contains(Collection collection, Object object)
public static boolean contains(Collection collection, Object object)
//package com.java2s; import java.util.Collection; public class Main { public static boolean contains(Collection collection, Object object) { return collection.contains(object); }// w ww. j a va 2s .com }