Here you can find the source of isContainedInAll(String keyToSearch, List
public static boolean isContainedInAll(String keyToSearch, List<Set<String>> list)
//package com.java2s; //License from project: Open Source License import java.util.List; import java.util.Set; public class Main { public static boolean isContainedInAll(String keyToSearch, List<Set<String>> list) { for (Set<String> otherEquivalenceClassesOID : list) { if (!otherEquivalenceClassesOID.contains(keyToSearch)) { return false; }// w ww . ja va 2 s .co m } return true; } }