Here you can find the source of isEqualList(List
public static <T> boolean isEqualList(List<T> list1, List<T> list2)
//package com.java2s; import java.util.List; public class Main { /**// w w w .j a v a2s . c o m * check equal without caring about the order. */ public static <T> boolean isEqualList(List<T> list1, List<T> list2) { if (list1 == list2) { return true; } if (list1 == null || list2 == null || list1.size() != list2.size()) { return false; } for (T obj1 : list1) { if (!list2.contains(obj1)) { return false; } } return true; } }