String (PsiVariable variable) { PsiType type = variable.getType(); String mapOp = null; if (type.equals(PsiTypes.intType())) { mapOp = "mapToInt"; } else if (type.equals(PsiTypes.longType())) { mapOp = "mapToLong"; } else if (type.equals(PsiTypes.doubleType())) { mapOp = "mapToDouble"; } return mapOp == null ? "" : "." + mapOp + "(" + variable.getName() + " -> " + variable.getName() + ")"; }