}
protected void swapModelInstance(M oldModel, M newModel) {
super.swapModelInstance(oldModel, newModel);
if (useKeyProvider != null) {
TreeModel wrapper = null;
if (useKeyProvider) {
wrapper = modelFastMap.get(getKey(oldModel));
} else {
wrapper = modelMap.get(oldModel);
}
if (wrapper != null) {
wrapperMap.put(wrapper.<String> get("id"), newModel);
if (!useKeyProvider && modelMap != null) {
modelMap.remove(oldModel);
modelMap.put(newModel, wrapper);
}
}