private static boolean isCollectionClassOrInterface(
    PsiClass aClass, Set<? super PsiClass> visitedClasses) {
    if (!visitedClasses.add(aClass)) {
      return false;
    }
    final String className = aClass.getQualifiedName();
    if (s_allCollectionClassesAndInterfaces.contains(className)) {
      return true;
    }
    final PsiClass[] supers = aClass.getSupers();
    for (PsiClass aSuper : supers) {
      if (isCollectionClassOrInterface(aSuper, visitedClasses)) {
        return true;
      }
    }
    return false;
  }
private static boolean isCollectionClassOrInterface(
    PsiClass aClass, Set<? super PsiClass> visitedClasses)