Example usage for com.google.common.collect ImmutableMap of

List of usage examples for com.google.common.collect ImmutableMap of

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableMap of.

Prototype

public static <K, V> ImmutableMap<K, V> of() 

Source Link

Usage

From source file:io.druid.query.QueryMetricUtil.java

public static <T> ServiceMetricEvent.Builder makeRequestTimeMetric(final ObjectMapper jsonMapper,
        final Query<T> query, final String remoteAddr) throws JsonProcessingException {
    return makeQueryTimeMetric(query)
            .setUser3(jsonMapper//  www . ja  v  a2s. co m
                    .writeValueAsString(query.getContext() == null ? ImmutableMap.of() : query.getContext()))
            .setUser7(remoteAddr).setUser8(query.getId());
}

From source file:org.example.PJUG12.java

@Setup
public void setup() {
    map = ImmutableMap.of();
    for (int i = 0; i < 10000; i++) {
        mapSize();/*ww  w.j a v  a  2  s. co  m*/
    }
    map = ImmutableMap.of(1, 1);
    for (int i = 0; i < 10000; i++) {
        mapSize();
    }
    map = ImmutableMap.of(1, 1, 2, 2);
}

From source file:io.appium.java_client.android.AndroidMobileCommandHelper.java

/**
 * This method forms a {@link Map} of parameters for the getting of the current package.
 *
 * @return a key-value pair. The key is the command name. The value is a {@link Map} command arguments.
 *//*w  w w  .  j av a2 s. c  o m*/
public static Map.Entry<String, Map<String, ?>> currentPackageCommand() {
    return new AbstractMap.SimpleEntry<>(GET_CURRENT_PACKAGE, ImmutableMap.of());
}

From source file:com.icosilune.fn.nodes.ConstantNode.java

@Override
public Map<String, Socket> getInputSockets() {
    return ImmutableMap.of();
}

From source file:org.androidtransfuse.analysis.AnalysisContext.java

@Inject
public AnalysisContext(/*@Assisted*/ InjectionNodeBuilderRepository injectionNodeBuilders) {
    this.dependents = ImmutableMap.of();
    this.injectionNodeBuilders = injectionNodeBuilders;
}

From source file:com.facebook.buck.util.FakeProcessExecutor.java

public FakeProcessExecutor() {
    this(ImmutableMap.of());
}

From source file:com.facebook.buck.features.python.toolchain.impl.PythonPlatformsProviderFactoryUtils.java

public static PythonPlatform getDefaultPythonPlatform(BuckConfig buckConfig, ProcessExecutor processExecutor,
        ExecutableFinder executableFinder) {
    return new PythonPlatformsProviderFactory()
            .createToolchain(/*ww w  . j  a v a 2s. c  om*/
                    new ToolchainProviderBuilder().withToolchain(PythonInterpreter.DEFAULT_NAME,
                            new PythonInterpreterFromConfig(new PythonBuckConfig(buckConfig), executableFinder))
                            .build(),
                    ToolchainCreationContext.of(ImmutableMap.of(), buckConfig, new FakeProjectFilesystem(),
                            processExecutor, executableFinder, TestRuleKeyConfigurationFactory.create()))
            .get().getPythonPlatforms().getValue(PythonBuckConfig.DEFAULT_PYTHON_PLATFORM);
}

From source file:com.google.template.soy.soyparse.PluginResolver.java

/**
 * Returns an empty resolver. Useful for tests, or situations where it is known that no plugins
 * will be needed./*from   w w  w. j  a va 2  s .c  om*/
 */
public static PluginResolver nullResolver(Mode mode, ErrorReporter reporter) {
    return new PluginResolver(mode, ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of(), reporter);
}

From source file:co.cask.cdap.data.stream.service.MutableStreamEventData.java

public MutableStreamEventData() {
    super(ImmutableMap.<String, String>of(), ByteBuffers.EMPTY_BUFFER);
    body = ByteBuffers.EMPTY_BUFFER;
    headers = ImmutableMap.of();
}

From source file:org.gradle.language.nativeplatform.internal.incremental.CompilationState.java

public CompilationState() {
    sourceInputs = ImmutableSet.of();
    fileStates = ImmutableMap.of();
}