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.apache.bigtop.bigpetstore.datagenerator.datamodels.inputs.Names.java
public Names(Map<String, Double> firstNames, Map<String, Double> lastNames) { this.firstNames = ImmutableMap.copyOf(firstNames); this.lastNames = ImmutableMap.copyOf(lastNames); }
From source file:talkeeg.common.util.Stringifiers.java
public Stringifiers(Map<Class<?>, Stringifier<?>> stringifiers) { this.stringifiers = ImmutableMap.copyOf(stringifiers); }
From source file:com.spotify.heroic.common.Statistics.java
public static Statistics of(Map<String, Long> samples) { return new Statistics(ImmutableMap.copyOf(samples)); }
From source file:com.dopsun.msg4j.core.messages.schema.DataDictionary.java
DataDictionary(Builder builder) { Objects.requireNonNull(builder); this.fields = ImmutableMap.copyOf(builder.fields); this.messages = ImmutableMap.copyOf(builder.messages); }
From source file:com.continuuity.weave.internal.DefaultWeaveRunnableSpecification.java
public DefaultWeaveRunnableSpecification(String className, String name, Map<String, String> arguments) { this.className = className; this.name = name; this.arguments = ImmutableMap.copyOf(arguments); }
From source file:io.usethesource.criterion.impl.immutable.guava.ImmutableGuavaMap.java
@Override public JmhMap put(JmhValue key, JmhValue value) { final HashMap<JmhValue, JmhValue> tmpContent = new HashMap<>(content); tmpContent.put(key, value);/*from w ww . j a va 2 s . c om*/ final ImmutableMap<JmhValue, JmhValue> newContent = ImmutableMap.copyOf(tmpContent); return new ImmutableGuavaMap(newContent); // try { // final ImmutableMap<JmhValue, JmhValue> newContent = // ImmutableMap.<JmhValue, JmhValue>builder().putAll(content).put(key, value).build(); // // return new ImmutableGuavaMap(newContent); // } catch (IllegalArgumentException e) { // return this; // } }
From source file:org.sonar.batch.bootstrap.BootstrapProperties.java
public BootstrapProperties(Map<String, String> properties) { this.properties = ImmutableMap.copyOf(properties); }
From source file:co.cask.common.cli.CompleterSet.java
/** * @param completers {@link Map} of argument name to {@link Completer}. */// w w w . j a va 2s . co m public CompleterSet(Map<String, Completer> completers) { this.completers = ImmutableMap.copyOf(completers); }
From source file:org.apache.aurora.common.args.Verifiers.java
private Verifiers(Map<Pair<Class<?>, Class<? extends Annotation>>, Verifier<?>> registry) { this.registry = ImmutableMap.copyOf(registry); }
From source file:chess_.engine.classic.board.Tile.java
private static Map<Integer, EmptyTile> createAllPossibleEmptyTiles() { final Map<Integer, EmptyTile> emptyTileMap = new HashMap<>(); for (int i = 0; i < BoardUtils.NUM_TILES; i++) { emptyTileMap.put(i, new EmptyTile(i)); }// w ww.j a va2 s . c om return ImmutableMap.copyOf(emptyTileMap); }