Here you can find the source of equalLists(List list1, List list2)
@SuppressWarnings("unchecked") public static boolean equalLists(List list1, List list2)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { @SuppressWarnings("unchecked") public static boolean equalLists(List list1, List list2) { return (list1.containsAll(list2) && list2.containsAll(list1)); }// w w w.j a v a 2 s . c o m }