Here you can find the source of contains(List
public final static boolean contains(List<int[]> list, int[] arr)
//package com.java2s; import java.util.*; public class Main { public final static boolean contains(List<int[]> list, int[] arr) { for (int[] arr2 : list) { if (arr.length != arr2.length) continue; for (int i = 0; i < arr2.length; i++) if (arr2[i] != arr[i]) continue; return true; }/* w w w.ja v a 2 s . c o m*/ return false; } }