Code example for TreeMap

Methods: putAll

0
    @Override 
    protected void addParametersToContext(ActionContext ac, Map newParams) {
        Map previousParams = ac.getParameters();
        Map combinedParams = null;
        if (previousParams != null) {
            combinedParams = new TreeMap(previousParams);
        } else { 
            combinedParams = new TreeMap();
        } 
        combinedParams.putAll(newParams);
 
        ac.setParameters(combinedParams);
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java