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:io.prestosql.sql.planner.LookupSymbolResolver.java

public LookupSymbolResolver(Map<Symbol, ColumnHandle> assignments, Map<ColumnHandle, NullableValue> bindings) {
    requireNonNull(assignments, "assignments is null");
    requireNonNull(bindings, "bindings is null");

    this.assignments = ImmutableMap.copyOf(assignments);
    this.bindings = ImmutableMap.copyOf(bindings);
}

From source file:org.apache.drill.jdbc.ConnectionInfo.java

public ConnectionInfo(String url, Properties params) {
    this(url, ImmutableMap.copyOf(params));
}

From source file:com.facebook.swift.service.puma.swift.ReadResultQueryInfo.java

@ThriftConstructor
public ReadResultQueryInfo(long startTimeResultWindow, Map<String, String> columnNameValueMap) {
    this.startTimeResultWindow = startTimeResultWindow;
    if (columnNameValueMap != null) {
        this.columnNameValueMap = ImmutableMap.copyOf(columnNameValueMap);
    } else {// ww  w  .java2s. c o  m
        this.columnNameValueMap = null;
    }
}

From source file:com.abiquo.apiclient.domain.options.BaseOptions.java

protected BaseOptions(final Map<String, Object> queryParams) {
    this.queryParams = ImmutableMap.copyOf(checkNotNull(queryParams, "queryParams cannot be null"));
}

From source file:com.facebook.presto.memory.MemoryInfo.java

@JsonCreator
public MemoryInfo(@JsonProperty("totalNodeMemory") DataSize totalNodeMemory,
        @JsonProperty("pools") Map<MemoryPoolId, MemoryPoolInfo> pools) {
    this.totalNodeMemory = requireNonNull(totalNodeMemory, "totalNodeMemory is null");
    this.pools = ImmutableMap.copyOf(requireNonNull(pools, "pools is null"));
}

From source file:co.cask.cdap.internal.app.runtime.procedure.DefaultProcedureRequest.java

DefaultProcedureRequest(String method, Map<String, String> arguments) {
    this.method = method;
    this.arguments = ImmutableMap.copyOf(arguments);
}

From source file:org.elasticsearch.index.analysis.FieldNameAnalyzer.java

public FieldNameAnalyzer(Map<String, Analyzer> analyzers, Analyzer defaultAnalyzer) {
    this.analyzers = ImmutableMap.copyOf(analyzers);
    this.defaultAnalyzer = defaultAnalyzer;
}

From source file:ruke.vrj.SymbolTable.java

/**
 * Copy only the symbols of a SymbolTable (ignore parent & owner).
 *
 * @param copy Which symbol table to copy
 * @return Copied symbol table//from  w w  w.ja va  2  s .com
 */
public static SymbolTable copyOf(final SymbolTable copy) {
    final SymbolTable result = new SymbolTable();
    result.symbols = ImmutableMap.copyOf(copy.symbols);
    return result;
}

From source file:co.cask.cdap.config.Config.java

/**
 * Constructor for Config Class./*w w  w  .  j a v a  2s. co m*/
 * @param name name of the configuration
 * @param properties map of properties
 */
public Config(String name, Map<String, String> properties) {
    Preconditions.checkNotNull(name);
    Preconditions.checkNotNull(properties);
    this.id = name;
    this.properties = ImmutableMap.copyOf(properties);
}

From source file:org.jclouds.openstack.domain.AuthenticationResponse.java

public AuthenticationResponse(String authToken, Map<String, URI> services) {
    this.authToken = checkNotNull(authToken, "authToken");
    this.services = ImmutableMap.copyOf(checkNotNull(services, "services"));
}