boolean (@NotNull String packageName, int classCount, boolean isStaticImportNeeded, @NotNull JavaCodeStyleSettings settings) { if (!settings.USE_SINGLE_CLASS_IMPORTS) return true; int limitCount = isStaticImportNeeded ? settings.NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND : settings.CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND; if (classCount >= limitCount) return true; if (packageName.isEmpty()) return false; PackageEntryTable table = settings.PACKAGES_TO_USE_IMPORT_ON_DEMAND; return table.contains(packageName); }