Example usage for java.util Map putAll

List of usage examples for java.util Map putAll

Introduction

In this page you can find the example usage for java.util Map putAll.

Prototype

void putAll(Map<? extends K, ? extends V> m);

Source Link

Document

Copies all of the mappings from the specified map to this map (optional operation).

Usage

From source file:com.github.blindpirate.gogradle.task.go.GoBuild.java

private void configureEnvironment(Os os, Arch arch, Go task) {
    Map<String, String> env = getEffectiveEnvironment(os, arch);
    env.putAll(this.environment);
    task.environment(env);//  ww w.  j a  v a 2 s  .  c  o m
}

From source file:edu.mayo.cts2.framework.plugin.service.lexevs.bulk.mapversion.MappingExtensionBulkDownloader.java

@Override
public void afterPropertiesSet() throws Exception {
    Map<String, Extractor> map = new HashMap<String, Extractor>();
    map.putAll(SOURCE_EXTRACTOR_MAP);
    map.putAll(TARGET_EXTRACTOR_MAP);/*from   www.j  a  v  a2s.  c o m*/

    this.extractorMap = map;
}

From source file:edu.cornell.mannlib.vitro.webapp.controller.login.LoginTemplateHelper.java

/**
 * We processed a response, and want to show a template. Version for JSP
 * page.//from  w ww  .j  av  a2 s .  c  o m
 */
private String doTemplate(VitroRequest vreq, TemplateResponseValues values) throws TemplateProcessingException {
    // Set it up like FreeMarkerHttpServlet.doGet() would do.
    Map<String, Object> map = new HashMap<String, Object>();
    map.putAll(getPageTemplateValues(vreq));
    map.putAll(values.getMap());

    return processTemplateToString(values.getTemplateName(), map, vreq);
}

From source file:io.kahu.hawaii.util.spring.HandlerMethodAdapter.java

public Map<String, List<HandlerMethodMappingInfo>> getEligibleHandlerMethods(
        HandlerMethodFilter... handlerMethodFilters) {
    Map<String, List<HandlerMethodMappingInfo>> result = new HashMap<>();
    if (handlerMethodFilters == null || handlerMethodFilters.length == 0) {
        result.putAll(mapping);
    } else {/*from   w  ww. j a  va2s. c  o  m*/
        for (Map.Entry<String, List<HandlerMethodMappingInfo>> entry : mapping.entrySet()) {
            List<HandlerMethodMappingInfo> eligibleMappingInfo = new ArrayList<>();
            for (HandlerMethodMappingInfo handlerMethodMappingInfo : entry.getValue()) {
                if (isEligible(handlerMethodMappingInfo.getHandlerMethod(), handlerMethodFilters)) {
                    eligibleMappingInfo.add(handlerMethodMappingInfo);
                }
            }
            if (CollectionUtils.isNotEmpty(eligibleMappingInfo)) {
                result.put(entry.getKey(), eligibleMappingInfo);
            }
        }
    }
    return result;
}

From source file:azkaban.jobs.AbstractProcessJob.java

public Map<String, String> getEnvironmentVariables() {
    Props props = getProps();//from w w  w. j  a v  a 2  s  . com
    Map<String, String> envMap = props.getMapByPrefix(ENV_PREFIX);
    envMap.putAll(props.getMapByPrefix(ENV_PREFIX_UCASE));
    return envMap;
}

From source file:com.liveramp.cascading_ext.CascadingUtil.java

public Map<Object, Object> getDefaultProperties() {
    Map<Object, Object> properties = new HashMap<Object, Object>();
    properties.putAll(getSerializationsProperty());
    properties.putAll(getSerializationTokensProperty());
    properties.putAll(defaultProperties);
    return properties;
}

From source file:eu.project.ttc.models.Context.java

protected Map<String, MutableDouble> sort() {
    Map<String, MutableDouble> occurrences = new TreeMap<String, MutableDouble>(comparator);
    occurrences.putAll(this.occurrences);
    return occurrences;
}

From source file:org.querybyexample.jpa.JpaUniqueUtil.java

private boolean checkCompositeUniqueConstraint(Identifiable<?> entity, Class<?> entityClass,
        UniqueConstraint u) {
    Map<String, Object> values = newHashMap();
    values.putAll(getPropertyConstraints(entity, entityClass, u, ""));
    return !existsInDatabaseOnAllObjects(entity, values);
}

From source file:org.hawkular.apm.tests.dist.AbstractITest.java

protected Response post(Server server, String path, String tenant, Object payload, Map<String, String> headers)
        throws IOException {

    byte[] payloadBytes = serialize(server, payload);
    Map<String, String> caseInsensitiveMap = new TreeMap<>((s1, s2) -> s1.compareToIgnoreCase(s2));
    caseInsensitiveMap.putAll(headers);
    if ("gzip".equalsIgnoreCase(caseInsensitiveMap.get("Content-Encoding"))) {
        payloadBytes = gzipCompression(payloadBytes);
    }/*w w w  .  j av  a  2 s.  com*/

    Request.Builder request = new Request.Builder().post(RequestBody.create(MEDIA_TYPE_JSON, payloadBytes))
            .headers(Headers.of(headers)).url(server.getURL() + path);

    if (tenant != null) {
        request.addHeader(HAWKULAR_TENANT_HEADER, tenant);
    }

    Response response = execute(request.build(), server);

    switch (server) {
    case Zipkin: {
        Assert.assertEquals(202, response.code());
    }
    }

    return response;
}