boolean (@Nullable PackageEntry entry, @NotNull String packageName, boolean isStatic) { if (isStatic() != isStatic || !matchesPackageName(packageName)) return false; if (entry == null) { return true; } if (entry.isStatic() != isStatic) return false; if (entry.isWithSubpackages() != isWithSubpackages()) { return !isWithSubpackages(); } if (entry == ALL_OTHER_IMPORTS_ENTRY || entry == ALL_OTHER_STATIC_IMPORTS_ENTRY) return true; if (this == ALL_OTHER_IMPORTS_ENTRY || this == ALL_OTHER_STATIC_IMPORTS_ENTRY) return false; return StringUtil.countChars(entry.getPackageName(), '.') < StringUtil.countChars(getPackageName(), '.'); }