PsiSubstitutor (boolean preferSubst) { PsiSubstitutor theSubst = mySubst; if (preferSubst) { myMapping.keySet().removeAll(mySubst.getSubstitutionMap().keySet()); } for (final PsiTypeParameter parm : myMapping.keySet()) { theSubst = theSubst.put(parm, myMapping.get(parm)); } return theSubst; }