Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static boolean equalsIgnoreOrder(Collection<?> c1, Collection<?> c2) { if (c1 == c2) { return true; } if (c1.size() != c2.size()) { return false; } return c1.containsAll(c2) && c2.containsAll(c1); } }