How can I easily check to see whether all the elements in one ArrayList are all elements of another ArrayList?
boolean isSubset = listA.containsAll(listB);
There is a containsAll method in all collections.
来源:https://stackoverflow.com/questions/808394/how-to-check-whether-the-elements-of-an-arraylist-are-all-contained-in-another-a