List of usage examples for com.google.common.collect ImmutableMap of
public static <K, V> ImmutableMap<K, V> of()
From source file:org.eclipse.wb.internal.core.model.util.ScriptUtils.java
/** * Evaluates given script./*from w ww . j a va2s . co m*/ */ public static Object evaluate(ClassLoader contextClassLoader, String script) { Map<String, Object> variables = ImmutableMap.of(); return evaluate(contextClassLoader, script, variables); }
From source file:ro.cosu.vampires.server.values.jobs.metrics.Stats.java
public static Stats empty() { return builder().histograms(ImmutableMap.of()).values(ImmutableMap.of()).meters(ImmutableMap.of()) .counters(ImmutableMap.of()).resources(ImmutableList.of()).build(); }
From source file:keywhiz.api.model.SecretSeries.java
public static SecretSeries of(long id, String name, @Nullable String description, ApiDate createdAt, @Nullable String createdBy, ApiDate updatedAt, @Nullable String updatedBy, @Nullable String type, @Nullable Map<String, String> generationOptions, @Nullable Long currentVersion) { ImmutableMap<String, String> options = (generationOptions == null) ? ImmutableMap.of() : ImmutableMap.copyOf(generationOptions); return new AutoValue_SecretSeries(id, name, nullToEmpty(description), createdAt, nullToEmpty(createdBy), updatedAt, nullToEmpty(updatedBy), Optional.ofNullable(type), options, Optional.ofNullable(currentVersion)); }
From source file:com.facebook.swift.codec.IsSetBean.java
public static IsSetBean createFull() { IsSetBean isSetBean = new IsSetBean(); isSetBean.aBoolean = false;//from ww w . j a v a2 s .c o m isSetBean.aByte = 0; isSetBean.aShort = 0; isSetBean.aInteger = 0; isSetBean.aLong = 0L; isSetBean.aDouble = 0.0d; isSetBean.aString = ""; isSetBean.aStruct = new BonkField(); isSetBean.aSet = ImmutableSet.of(); isSetBean.aList = ImmutableList.of(); isSetBean.aMap = ImmutableMap.of(); return isSetBean; }
From source file:com.facebook.presto.hive.TableParameterCodec.java
/** * Decode Hive table parameters into additional Presto table properties. *//* ww w . j ava2 s . c o m*/ public Map<String, Object> decode(Map<String, String> tableParameters) { return ImmutableMap.of(); }
From source file:io.prestosql.plugin.thrift.DefaultThriftHeaderProvider.java
@Override public Map<String, String> getHeaders(ConnectorSession session) { return ImmutableMap.of(); }
From source file:ro.cosu.vampires.server.values.jobs.metrics.Metric.java
public static Metric empty() { return new AutoValue_Metric.Builder().values(ImmutableMap.of()).time(emptyTime).build(); }
From source file:io.appium.java_client.android.AndroidMobileCommandHelper.java
/** * This method forms a {@link Map} of parameters for the getting of the current activity. * * @return a key-value pair. The key is the command name. The value is a {@link Map} command arguments. *///www. j a v a 2 s . c om public static Map.Entry<String, Map<String, ?>> currentActivityCommand() { return new AbstractMap.SimpleEntry<>(CURRENT_ACTIVITY, ImmutableMap.of()); }
From source file:org.opendaylight.controller.cluster.datastore.LocalFrontendHistory.java
static LocalFrontendHistory create(final String persistenceId, final ShardDataTree tree, final ShardDataTreeTransactionChain chain) { return new LocalFrontendHistory(persistenceId, tree, chain, ImmutableMap.of(), TreeRangeSet.create()); }
From source file:com.facebook.presto.plugin.memory.MemoryQueryRunner.java
public static DistributedQueryRunner createQueryRunner(Map<String, String> extraProperties) throws Exception { Session session = testSessionBuilder().setCatalog(CATALOG).setSchema("default").build(); DistributedQueryRunner queryRunner = new DistributedQueryRunner(session, 4, extraProperties); try {// www .j ava 2 s .co m queryRunner.installPlugin(new MemoryPlugin()); queryRunner.createCatalog(CATALOG, "memory", ImmutableMap.of()); queryRunner.installPlugin(new TpchPlugin()); queryRunner.createCatalog("tpch", "tpch", ImmutableMap.of()); copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, session, TpchTable.getTables()); return queryRunner; } catch (Exception e) { closeAllSuppress(e, queryRunner); throw e; } }