void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiReferenceExpression referenceExpression)) { return; } final String newMethodCallText = getCollectionsMethodCallText(referenceExpression); PsiReplacementUtil.replaceExpression(referenceExpression, "java.util." + newMethodCallText); }