protected Map cloneMap(Map map){
        // bug 270413.  This method is needed to avoid the class cast exception when the reference mode is weak.
    	if (this.referenceMode != null && this.referenceMode != ReferenceMode.HARD) return (IdentityWeakHashMap)((IdentityWeakHashMap)map).clone();
        return (IdentityHashMap)((IdentityHashMap)map).clone();
    }
protected Map cloneMap(Map map){
       
    	if (this.referenceMode != null && this.referenceMode != ReferenceMode.HARD) return (IdentityWeakHashMap)((IdentityWeakHashMap)map).clone();
        return (IdentityHashMap)((IdentityHashMap)map).clone();
    }
protected map clonemap(map map){ if (this.referencemode != null && this.referencemode != referencemode.hard) return (identityweakhashmap)((identityweakhashmap)map).clone(); return (identityhashmap)((identityhashmap)map).clone(); }