List of usage examples for com.google.common.collect ImmutableMap of
public static <K, V> ImmutableMap<K, V> of()
From source file:com.google.errorprone.ErrorProneFlags.java
public static ErrorProneFlags empty() { return new ErrorProneFlags(ImmutableMap.of()); }
From source file:org.locationtech.geogig.rocksdb.DBConfig.java
public DBConfig(String dbpath, boolean readOnly) { this(dbpath, readOnly, ImmutableMap.of(), Collections.emptySet()); }
From source file:io.prestosql.benchmark.driver.BenchmarkSchema.java
public BenchmarkSchema(String name) { this(name, ImmutableMap.of()); }
From source file:io.prestosql.benchmark.BenchmarkQueryRunner.java
public static LocalQueryRunner createLocalQueryRunner(Map<String, String> extraSessionProperties) { SessionBuilder sessionBuilder = testSessionBuilder().setCatalog("tpch").setSchema(TINY_SCHEMA_NAME); extraSessionProperties.forEach(sessionBuilder::setSystemProperty); Session session = sessionBuilder.build(); LocalQueryRunner localQueryRunner = new LocalQueryRunner(session); // add tpch/* w w w.j a v a2 s . c o m*/ localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of()); return localQueryRunner; }
From source file:ro.cosu.vampires.server.values.jobs.metrics.Metrics.java
public static Metrics empty() { return new AutoValue_Metrics.Builder().id("empty").metrics(ImmutableList.of()).metadata(ImmutableMap.of()) .build();/*www . j a v a2s. c o m*/ }
From source file:com.isotrol.impe3.pms.core.obj.Builders.java
static <K, V> ImmutableMap<K, V> build(ImmutableMap.Builder<K, V> builder) { if (builder == null) { return ImmutableMap.of(); }/* w ww .j av a2s. co m*/ return builder.build(); }
From source file:org.apache.james.transport.mailets.MappingArgument.java
public static ImmutableMap<String, String> parse(String mapping) throws MessagingException { Preconditions.checkArgument(mapping != null, "mapping should not be null"); if (mapping.trim().isEmpty()) { return ImmutableMap.of(); }//from w w w. java2s .com return Splitter.on(',').omitEmptyStrings().splitToList(mapping).stream().map(MappingArgument::parseKeyValue) .collect(Guavate.toImmutableMap(Pair::getLeft, Pair::getRight)); }
From source file:io.airlift.drift.client.DriftClient.java
default T get(Optional<String> addressSelectionContext) { return get(addressSelectionContext, ImmutableMap.of()); }
From source file:com.opengamma.strata.engine.config.pricing.ConfiguredFunctionGroup.java
/** * Returns a configured function group containing the specified function group and no arguments. * * @param functionGroup the group definition * @return a configured function group containing the specified function group and no arguments *///from ww w . j a va 2 s .c om public static ConfiguredFunctionGroup of(FunctionGroup<?> functionGroup) { return new ConfiguredFunctionGroup(functionGroup, ImmutableMap.of()); }
From source file:io.sidecar.query.HistogramAnswer.java
public HistogramAnswer(Map<String, Integer> b) { if (b == null) { buckets = ImmutableMap.of(); } else {//from www . ja v a 2 s . c om ImmutableMap.Builder<String, Integer> imb = ImmutableMap.builder(); for (Map.Entry<String, Integer> e : b.entrySet()) { imb.put(e.getKey(), e.getValue()); } buckets = imb.build(); } }