src/org/nutz/lang/util/NutMap.java
@Override
    @SuppressWarnings("unchecked")
    public NutMap mergeWith(Map<String, Object> map, boolean onlyAbsent) {
        for (Map.Entry<String, Object> en : map.entrySet()) {
            String key = en.getKey();
            Object val = en.getValue();

            if (null == key || null == val)
                continue;

            Object myVal = this.get(key);

            // 如果两边都是 Map ，则融合
            if (null != myVal && myVal instanceof Map && val instanceof Map) {
                Map<String, Object> m0 = (Map<String, Object>) myVal;
                Map<String, Object> m1 = (Map<String, Object>) val;
                NutMap m2 = NutMap.WRAP(m0).mergeWith(m1, onlyAbsent);
                // 搞出了新 Map，设置一下
                if (m2 != m0)
                    this.put(key, m2);
            }
            // 只有没有的时候才设置
            else if (onlyAbsent) {
                this.setnx(key, val);
            }
            // 否则直接替换
            else {
                this.put(key, val);
            }
        }

        return this;
    }
@Override
    @SuppressWarnings("unchecked")
    public NutMap mergeWith(Map<String, Object> map, boolean onlyAbsent) {
        for (Map.Entry<String, Object> en : map.entrySet()) {
            String key = en.getKey();
            Object val = en.getValue();

            if (null == key || null == val)
                continue;

            Object myVal = this.get(key);

            // 如果两边都是 Map ，则融合
            if (null != myVal && myVal instanceof Map && val instanceof Map) {
                Map<String, Object> m0 = (Map<String, Object>) myVal;
                Map<String, Object> m1 = (Map<String, Object>) val;
                NutMap m2 = NutMap.WRAP(m0).mergeWith(m1, onlyAbsent);
                // 搞出了新 Map，设置一下
                if (m2 != m0)
                    this.put(key, m2);
            }
            // 只有没有的时候才设置
            else if (onlyAbsent) {
                this.setnx(key, val);
            }
            // 否则直接替换
            else {
                this.put(key, val);
            }
        }

        return this;
    }
@ Override @ SuppressWarnings ( "unchecked" ) public NutMap mergeWith ( Map < String , Object > map , boolean onlyAbsent ) { for ( Map . Entry < String , Object > en : map . entrySet ( ) ) { String key = en . getKey ( ) ; Object val = en . getValue ( ) ; if ( null == key || null == val ) continue ; Object myVal = this . get ( key ) ; // 如果两边都是 Map ，则融合
 if ( null != myVal && myVal instanceof Map && val instanceof Map ) { Map < String , Object > m0 = ( Map < String , Object > ) myVal ; Map < String , Object > m1 = ( Map < String , Object > ) val ; NutMap m2 = NutMap . WRAP ( m0 ) . mergeWith ( m1 , onlyAbsent ) ; // 搞出了新 Map，设置一下
 if ( m2 != m0 ) this . put ( key , m2 ) ; } // 只有没有的时候才设置
 else if ( onlyAbsent ) { this . setnx ( key , val ) ; } // 否则直接替换
 else { this . put ( key , val ) ; } } return this ; }
与一个给定的 Map 融合，如果有子 Map 递归

@param map
要合并进来的 Map
@param onlyAbsent
true 表示只有没有 key 才设置值
@return 自身以便链式赋值
与一个给定的 Map 融合，如果有子 Map 递归