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

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

Introduction

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

Prototype

public static <K, V> ImmutableMap<K, V> copyOf(Iterable<? extends Entry<? extends K, ? extends V>> entries) 

Source Link

Usage

From source file:com.google.gxp.compiler.base.MultiLanguageAttrValue.java

public MultiLanguageAttrValue(Map<OutputLanguage, String> map, String defaultValue) {
    this.map = ImmutableMap.copyOf(map);
    this.defaultValue = defaultValue;
}

From source file:com.afterkraft.groups.util.ExternalProviderRegistration.java

/**
 * You should not call this - KraftRPG will call this once it has loaded.
 */// w  ww  .  j  a v a  2s  . c o m
public static void finish() {
    pluginEnabled = true;
    storageBackends = ImmutableMap.copyOf(storageBackends);
}

From source file:com.codenvy.client.core.model.project.DefaultRunnerConfiguration.java

@JsonCreator
public DefaultRunnerConfiguration(@JsonProperty("ram") int ram,
        @JsonProperty("options") Map<String, String> options,
        @JsonProperty("variables") Map<String, String> variables) {
    this.ram = ram;
    this.options = ImmutableMap.copyOf(options == null ? new HashMap<String, String>() : options);
    this.variables = ImmutableMap.copyOf(variables == null ? new HashMap<String, String>() : variables);
}

From source file:com.facebook.presto.sql.planner.Plan.java

public Plan(PlanNode root, Map<Symbol, Type> types, Map<PlanNodeId, PlanNodeCost> planNodeCosts) {
    requireNonNull(root, "root is null");
    requireNonNull(types, "types is null");
    requireNonNull(planNodeCosts, "planNodeCosts is null");

    this.root = root;
    this.types = ImmutableMap.copyOf(types);
    this.planNodeCosts = planNodeCosts;
}

From source file:com.google.firebase.messaging.WebpushConfig.java

private WebpushConfig(Builder builder) {
    this.headers = builder.headers.isEmpty() ? null : ImmutableMap.copyOf(builder.headers);
    this.data = builder.data.isEmpty() ? null : ImmutableMap.copyOf(builder.data);
    this.notification = builder.notification != null ? builder.notification.getFields() : null;
}

From source file:org.onosproject.store.ecmap.AntiEntropyAdvertisement.java

/**
 * Creates a new anti entropy advertisement message.
 *
 * @param sender the sender's node ID//from w w  w .j a va2s.  c  o  m
 * @param digest for map entries
 */
public AntiEntropyAdvertisement(NodeId sender, Map<K, MapValue.Digest> digest) {
    this.sender = checkNotNull(sender);
    this.digest = ImmutableMap.copyOf(checkNotNull(digest));
}

From source file:com.eviware.loadui.util.statistics.store.EntryImpl.java

public EntryImpl(long timestamp, Map<String, Number> values) {
    this.timestamp = timestamp;
    this.values = ImmutableMap.copyOf(values);
}

From source file:com.basho.riak.presto.RiakConnectorFactory.java

public RiakConnectorFactory(TypeManager typeManager, Map<String, String> optionalConfig) {
    this.typeManager = checkNotNull(typeManager, "typeManager is given as null");
    this.optionalConfig = ImmutableMap.copyOf(checkNotNull(optionalConfig, "optionalConfig is null"));
}

From source file:org.apache.bigtop.bigpetstore.datagenerator.generators.purchase.PurchasingProcesses.java

public PurchasingProcesses(Map<String, Sampler<Product>> processes) {
    this.processes = ImmutableMap.copyOf(processes);
}

From source file:be.fror.password.rule.Failure.java

/**
 *
 * @param errorCode//from  ww w  .jav a2s  .  c o  m
 * @param parameters
 */
public Failure(final String errorCode, final Map<String, Object> parameters) {
    checkNotNull(errorCode, "errorCode must not be null");
    this.errorCode = errorCode;
    this.parameters = ImmutableMap.copyOf(parameters);
}