Here you can find the source of mergeNsPrefixes(final Map
Parameter | Description |
---|---|
prioritaryPrefixes | a parameter |
additionalPrefixes | a parameter |
public static Map<String, String> mergeNsPrefixes(final Map<String, String> prioritaryPrefixes, final Map<String, String> additionalPrefixes)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**/*from ww w. j a v a2 s . co m*/ * Creates a new Map object containing all prefixes from both specified maps. When prefix mappings clash, the mappings * from prioritaryPrefixes are used. * @param prioritaryPrefixes * @param additionalPrefixes * @return */ public static Map<String, String> mergeNsPrefixes(final Map<String, String> prioritaryPrefixes, final Map<String, String> additionalPrefixes) { Map<String, String> mergedPrefixes = new HashMap<String, String>(); mergedPrefixes.putAll(additionalPrefixes); mergedPrefixes.putAll(prioritaryPrefixes); //overwrites the additional prefixes when clashing return mergedPrefixes; } }