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:ratpack.groovy.template.TextTemplate.java
public TextTemplate(Map<String, ?> model, String id, String type) { this.id = id; this.type = type; this.model = ImmutableMap.copyOf(model); }
From source file:com.netflix.spinnaker.orca.TaskContext.java
default ImmutableMap<String, Object> getInputs(String prefix) { final String prefixWithDot = format("%s.", prefix); return ImmutableMap .copyOf(getInputs().entrySet().stream().filter(it -> it.getKey().startsWith(prefixWithDot)) .collect(toMap(it -> it.getKey().substring(prefixWithDot.length()), Map.Entry::getValue))); }
From source file:com.spotify.docker.client.messages.swarm.EngineConfig.java
@JsonCreator static EngineConfig create(@JsonProperty("EngineVersion") final String engineVersion, @JsonProperty("Labels") final Map<String, String> labels, @JsonProperty("Plugins") final List<EnginePlugin> plugins) { final ImmutableMap<String, String> labelsT = labels == null ? null : ImmutableMap.copyOf(labels); final ImmutableList<EnginePlugin> pluginsT = plugins == null ? null : ImmutableList.copyOf(plugins); return new AutoValue_EngineConfig(engineVersion, labelsT, pluginsT); }
From source file:org.geoserver.wms.topojson.TopoGeom.java
public void setProperties(Map<String, Object> properties) { this.properties = ImmutableMap.copyOf(properties); }
From source file:org.ratpackframework.groovy.Template.java
public Template(String id, Map<String, ?> model, String type) { this.id = id; this.type = type; this.model = ImmutableMap.copyOf(model); }
From source file:com.opengamma.engine.marketdata.live.LiveMarketDataProviderFactory.java
public LiveMarketDataProviderFactory(MarketDataProvider defaultProvider, Map<String, MarketDataProvider> sourceToProviderMap) { _defaultProvider = defaultProvider;/*w w w . j ava2 s .c o m*/ _sourceToProviderMap = ImmutableMap.copyOf(sourceToProviderMap); }
From source file:co.cask.cdap.route.store.RouteConfig.java
public RouteConfig(Map<String, Integer> routes) { Preconditions.checkNotNull(routes); this.routes = ImmutableMap.copyOf(routes); }
From source file:com.google.devtools.build.lib.analysis.BuildInfoEvent.java
/** * Construct the event from a map. */ public BuildInfoEvent(Map<String, String> buildInfo) { buildInfoMap = ImmutableMap.copyOf(buildInfo); }
From source file:org.cobbzilla.mail.TemplatedMailKestrelConfiguration.java
public void setProperty(String name, String value) { Map<String, String> copy = new HashMap<>(properties); copy.put(name, value);//from ww w .j av a2 s . c om properties = ImmutableMap.copyOf(copy); }
From source file:com.google.devtools.build.lib.analysis.MakeEnvironmentEvent.java
/** * Construct the event. */ public MakeEnvironmentEvent(Map<String, String> makeEnv) { makeEnvMap = ImmutableMap.copyOf(makeEnv); }