Example usage for org.apache.commons.collections MapUtils safeAddToMap

List of usage examples for org.apache.commons.collections MapUtils safeAddToMap

Introduction

In this page you can find the example usage for org.apache.commons.collections MapUtils safeAddToMap.

Prototype

public static void safeAddToMap(Map map, Object key, Object value) throws NullPointerException 

Source Link

Document

Protects against adding null values to a map.

Usage

From source file:org.bonitasoft.test.toolkit.organization.profiles.TestProfile.java

private Map<String, Serializable> createAddCommandParameters(String name, String description, String icon) {
    Map<String, Serializable> parameters = new HashMap<String, Serializable>();
    MapUtils.safeAddToMap(parameters, PROFILE_NAME, name);
    MapUtils.safeAddToMap(parameters, PROFILE_DESCRITION, description);
    MapUtils.safeAddToMap(parameters, PROFILE_ICON, icon);
    return parameters;
}