List of usage examples for com.google.common.collect ImmutableMap copyOf
public static <K, V> ImmutableMap<K, V> copyOf(Iterable<? extends Entry<? extends K, ? extends V>> entries)
From source file:com.opengamma.integration.regression.IdMappings.java
public IdMappings(Map<ObjectId, Integer> ids, int maxId) { JodaBeanUtils.notNull(ids, "ids"); this._ids = ImmutableMap.copyOf(ids); this._maxId = maxId; }
From source file:org.jclouds.packet.domain.Project.java
@SerializedNames({ "id", "name", "created_at", "updated_at", "max_devices", "members", "memberships", "invitations", "payment_method", "devices", "ssh_keys", "volumes", "href" }) public static Project create(String id, String name, Date createdAt, Date updatedAt, Map<String, Object> maxDevices, List<Href> members, List<Href> memberships, List<Href> invitations, Href paymentMethod, List<Href> devices, List<Href> sshKeys, List<Href> volumes, String href) { return new AutoValue_Project(id, name, createdAt, updatedAt, maxDevices == null ? ImmutableMap.<String, Object>of() : ImmutableMap.copyOf(maxDevices), members == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(members), memberships == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(memberships), invitations == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(invitations), paymentMethod, devices == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(devices), sshKeys == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(sshKeys), volumes == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(volumes), href); }
From source file:co.cask.cdap.internal.app.runtime.batch.dataset.output.MultipleOutputsCommitter.java
public MultipleOutputsCommitter(Map<String, OutputCommitter> committers) { this.committers = ImmutableMap.copyOf(committers); }
From source file:com.facebook.presto.sql.gen.PreGeneratedExpressions.java
public PreGeneratedExpressions(Map<CallExpression, MethodDefinition> tryMethodMap, Map<LambdaDefinitionExpression, CompiledLambda> compiledLambdaMap) { this.tryMethodMap = ImmutableMap.copyOf(requireNonNull(tryMethodMap, "tryMethodMap is null")); this.compiledLambdaMap = ImmutableMap .copyOf(requireNonNull(compiledLambdaMap, "compiledLambdaMap is null")); }
From source file:co.cask.cdap.api.metrics.MetricTimeSeries.java
public MetricTimeSeries(String metricName, Map<String, String> tagValues, List<TimeValue> timeValues) { this.metricName = metricName; this.tagValues = ImmutableMap.copyOf(tagValues); this.timeValues = ImmutableList.copyOf(timeValues); }
From source file:com.okta.sdk.models.log.LogDebugContext.java
/** * Constructor for LogDebugContext.//from w w w.ja v a 2 s .c om * @param debugData {@link Map} */ @JsonCreator public LogDebugContext(@JsonProperty("debugData") Map<String, Object> debugData) { if (debugData != null) { this.debugData = ImmutableMap.copyOf(debugData); } else { this.debugData = null; } }
From source file:org.apache.phoenix.schema.stat.PTableStatsImpl.java
public PTableStatsImpl(Map<String, byte[][]> stats) { regionGuidePosts = ImmutableMap.copyOf(stats); }
From source file:models.TemplateOptions.java
public Map<String, String> tags() { return ImmutableMap.copyOf(tags); }
From source file:org.apache.giraph.writable.kryo.serializers.ImmutableMapSerializer.java
@Override public Map read(Kryo kryo, Input input, Class<Map> type) { Map map = super.read(kryo, input, (Class<Map>) ((Object) HashMap.class)); return ImmutableMap.copyOf(map); }
From source file:com.facebook.swift.service.puma.swift.SingleQueryInfo.java
@ThriftConstructor public SingleQueryInfo(String logicalTableName, Map<String, String> filter, List<String> selectList) { this.logicalTableName = logicalTableName; if (filter != null) { this.filter = ImmutableMap.copyOf(filter); } else {/*from w w w.j a va 2 s. c om*/ this.filter = ImmutableMap.of(); } if (selectList != null) { this.selectList = ImmutableList.copyOf(selectList); } else { this.selectList = ImmutableList.of(); } }