public static int countUnconditionalPatterns(@NotNull PsiExpression selector,
                                               @NotNull Set<Object> existingCaseValues) {
    PsiType selectorType = selector.getType();
    if (selectorType == null) return 0;
    int count = 0;
    for (Object caseValue : existingCaseValues) {
      if (caseValue instanceof PsiPattern && JavaPsiPatternUtil.isUnconditionalForType((PsiPattern)caseValue, selectorType)) {
        count++;
      }
    }
    return count;
  }
public static int countUnconditionalPatterns(@NotNull PsiExpression selector,
                                               @NotNull Set<Object> existingCaseValues)