Example usage for com.google.common.collect ImmutableMultimap copyOf

List of usage examples for com.google.common.collect ImmutableMultimap copyOf

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableMultimap copyOf.

Prototype

@Beta
public static <K, V> ImmutableMultimap<K, V> copyOf(
        Iterable<? extends Entry<? extends K, ? extends V>> entries) 

Source Link

Document

Returns an immutable multimap containing the specified entries.

Usage

From source file:com.nesscomputing.httpclient.response.HttpResponse.java

HttpResponse(int statusCode, @Nonnull byte[] body, @Nullable String charset,
        @Nonnull Multimap<String, String> headers) {
    this.statusCode = statusCode;
    this.body = body;
    this.charset = charset;
    this.headers = ImmutableMultimap.copyOf(headers);
}

From source file:com.outerspacecat.util.ConcurrentNamespaceContext.java

private ConcurrentNamespaceContext(final ImmutableMap<String, String> prefixMap,
        final ImmutableMultimap<String, String> namespaceMap) {
    this.prefixMap = ImmutableMap.copyOf(prefixMap);
    this.namespaceMap = ImmutableMultimap.copyOf(namespaceMap);
}

From source file:net.uytrewq.jogp.OgpValues.java

/**
 * Constructor./* w  ww.  j  a  va  2 s  .  c om*/
 * 
 * @param prefix
 *            The prefix of the ogp key name. Mostly it would be "og:"
 * @param values
 *            The multimap of the ogp values.
 */
public OgpValues(String prefix, Multimap<String, String> values, String htmlTitle,
        Collection<String> htmlImages) {
    this.prefix = prefix;
    this.values = ImmutableMultimap.copyOf(values);
    this.htmlTitle = htmlTitle;
    this.htmlImages = ImmutableList.copyOf(htmlImages);
}

From source file:com.talis.storage.SubmittedItem.java

public Multimap<String, String> getMetadata() {
    return ImmutableMultimap.copyOf(metadata);
}

From source file:com.griddynamics.jagger.engine.e1.sessioncomparation.SessionVerdict.java

public SessionVerdict(Decision decision, Multimap<String, Verdict> details) {
    Preconditions.checkNotNull(details);

    this.decision = decision;
    this.details = ImmutableMultimap.copyOf(details);
}

From source file:org.eclipse.incquery.runtime.evm.api.resolver.ScopedConflictSet.java

/**
 *
 *//*from  ww  w .j  a v a 2  s .com*/
public ScopedConflictSet(final RuleBase ruleBase, final ConflictResolver conflictResolver,
        final Multimap<RuleSpecification<?>, EventFilter<?>> specificationFilters) {
    this.ruleBase = ruleBase;
    this.changeableConflictSet = conflictResolver.createConflictSet();
    this.specificationFilters = ImmutableMultimap.copyOf(specificationFilters);
    this.listener = new ConflictSetUpdater(changeableConflictSet);
    for (final Entry<RuleSpecification<?>, EventFilter<?>> entry : specificationFilters.entries()) {
        final RuleSpecification<?> ruleSpecification = entry.getKey();
        registerListenerFromInstance(ruleSpecification, entry.getValue());
    }
}

From source file:io.wcm.caravan.io.http.response.CaravanHttpResponse.java

CaravanHttpResponse(int status, String reason, Multimap<String, String> headers, Body body) {
    checkState(status >= 200, "Invalid status code: %s", status);
    this.status = status;
    this.reason = checkNotNull(reason, "reason");
    Multimap<String, String> copyOf = LinkedHashMultimap.create(checkNotNull(headers, "headers"));
    this.headers = ImmutableMultimap.copyOf(copyOf);
    this.body = body; // nullable
}

From source file:com.palantir.atlasdb.cleaner.CleanupFollower.java

private CleanupFollower(Multimap<String, OnCleanupTask> cleanupTasksByTable) {
    this.cleanupTasksByTable = ImmutableMultimap.copyOf(cleanupTasksByTable);
}

From source file:io.helixservice.feature.restservice.controller.Request.java

/**
 * Query parameters from the request/* w w w. ja va  2s  .com*/
 *
 * @return Multimap of parameters to values
 */
public Multimap<String, String> getParams() {
    return ImmutableMultimap.copyOf(params);
}

From source file:com.isotrol.impe3.core.engine.ImmutableRenderContext.java

ImmutableRenderContext(final ComponentRequestContext delegate, final Integer width,
        final Multimap<String, String> query) {
    this.delegate = checkNotNull(delegate);
    this.width = width;
    if (query == null) {
        this.query = ImmutableMultimap.of();
    } else {/*from  w w w .j a va 2  s  . c o  m*/
        this.query = ImmutableMultimap.copyOf(query);
    }
}