void (List<String> list, Set<String> set, Iterable<String> it) { if(set.containsAll(list)) { System.out.println("all matched"); } if(list.containsAll(set)) { System.out.println("all matched"); } /*one*/ if(((Collection<String>/*two*/) it).containsAll(set)) { System.out.println("all matched"); } }