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:org.eclipse.xtext.formatting2.regionaccess.internal.NodeModelBasedRegionAccess.java
protected NodeModelBasedRegionAccess(NodeModelBasedRegionAccessBuilder builder) { this.resource = builder.getXtextResource(); this.eObjectToTokens = ImmutableMap.copyOf(builder.getEObjectToTokensMap(this)); }
From source file:org.graylog2.plugin.rest.ValidationApiError.java
public ValidationApiError(String message, Map<String, List<ValidationResult>> validationErrors) { super(message); this.validationErrors = ImmutableMap.copyOf(validationErrors); }
From source file:com.facebook.swift.parser.model.Header.java
public Header(List<String> includes, Map<String, String> namespaces, List<String> cppIncludes) { this.includes = ImmutableList.copyOf(checkNotNull(includes, "includes")); this.namespaces = ImmutableMap.copyOf(checkNotNull(namespaces, "namespaces")); this.cppIncludes = ImmutableList.copyOf(checkNotNull(cppIncludes, "cppIncludes")); }
From source file:org.apache.bigtop.datagenerators.bigpetstore.datamodels.Product.java
public Product(Map<String, Object> fields) { this.fields = ImmutableMap.copyOf(fields); }
From source file:io.sidecar.query.StatsAnswer.java
public StatsAnswer(Map<String, Map<String, Double>> statsKeys) { if (statsKeys == null) { keys = ImmutableMap.of();/*from w w w . j a v a 2s.c o m*/ } else { Builder<String, ImmutableMap<String, Double>> imb = ImmutableMap.builder(); for (Map.Entry<String, Map<String, Double>> e : statsKeys.entrySet()) { imb.put(e.getKey(), ImmutableMap.copyOf(e.getValue())); } keys = imb.build(); } }
From source file:org.eclipse.xtext.ui.codetemplates.ui.highlighting.SingleTemplateTokenDefProvider.java
@Override public Map<Integer, String> getTokenDefMap() { if (map == null) { AntlrTokenDefProvider provider = new AntlrTokenDefProvider(); provider.setAntlrTokenFileProvider(this); map = ImmutableMap.copyOf(provider.getTokenDefMap()); }/* w w w .ja v a 2s. c om*/ return map; }
From source file:com.android.tools.idea.wizard.dynamic.RadioButtonGroupBinding.java
public RadioButtonGroupBinding(Map<JRadioButton, E> buttonToValue) { myValueToButtonBinding = ImmutableMap.copyOf(buttonToValue); ButtonGroup buttonGroup = new ButtonGroup(); for (JRadioButton button : buttonToValue.keySet()) { buttonGroup.add(button);//from w w w . ja va 2 s . c o m } }
From source file:co.cask.cdap.api.dataset.lib.PartitionKey.java
/** * Private constructor to force use of the builder. *//*from ww w . ja v a 2 s.c o m*/ private PartitionKey(@Nonnull Map<String, Comparable> fields) { this.fields = ImmutableMap.copyOf(fields); }
From source file:org.mayocat.shop.payment.internal.PaymentRequestBuilder.java
public PaymentRequestBuilder withData(Map<String, Object> data) { this.data = ImmutableMap.copyOf(data); return this; }
From source file:com.facebook.buck.rules.FakeRepositoryFactory.java
public FakeRepositoryFactory(Path root) { super(ImmutableMap.copyOf(System.getenv()), Platform.detect(), new TestConsole(), root); }