Here you can find the source of contains(int[] subject, int[][] list)
public static boolean contains(int[] subject, int[][] list)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.List; public class Main { public static boolean contains(int[] subject, int[][] list) { for (int[] row : list) { if (Arrays.equals(subject, row)) { return true; }/*from w w w .ja va 2 s .co m*/ } return false; } public static boolean equals(int[][] ar1, int[][] ar2) { if (ar1.length != ar2.length) return false; for (int[] row1 : ar1) { if (!contains(row1, ar2)) { return false; } } return true; } public static <T> boolean equals(List<List<T>> lists1, List<List<T>> lists2) { for (List<T> list1 : lists1) { if (!lists2.contains(list1)) { return false; } } return true; } }