public static Map dotAssoc(
            final Map map, final Class<? extends Map> nodeClass, final String pathString, final Object value
    ) {
        if (pathString == null || pathString.isEmpty()) {
            throw new IllegalArgumentException(PATH_MUST_BE_SPECIFIED);
        }
        if (value == null) {
            return map;
        }
        if (!pathString.contains(SEPARATOR)) {
            map.put(pathString, value);
            return map;
        }
        return MapApi.assoc(map, nodeClass, pathString.split(SEPARATOR_REGEX), value);
    }
public static Map dotAssoc ( final Map map , final Class < ? extends Map > nodeClass , final String pathString , final Object value ) { if ( pathString == null || pathString . isEmpty ( ) ) { throw new IllegalArgumentException ( PATH_MUST_BE_SPECIFIED ) ; } if ( value == null ) { return map ; } if ( ! pathString . contains ( SEPARATOR ) ) { map . put ( pathString , value ) ; return map ; } return MapApi . assoc ( map , nodeClass , pathString . split ( SEPARATOR_REGEX ) , value ) ; }
Associates new value in map placed at path. New nodes are created with nodeClass if needed.
@param map subject original map
@param nodeClass class for intermediate nodes
@param pathString nodes to walk in map path to place new value
@param value new value
@return original map