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(K k1, V v1) 

Source Link

Usage

From source file:org.openqa.selenium.remote.RenderedRemoteWebElement.java

public boolean isDisplayed() {
    Response response = parent.execute(DriverCommand.IS_ELEMENT_DISPLAYED, ImmutableMap.of("id", id));
    return (Boolean) response.getValue();
}

From source file:org.openqa.selenium.grid.distributor.httpd.DefaultDistributorConfig.java

DefaultDistributorConfig() {
    super(ImmutableMap.of("events",
            ImmutableMap.of("publish", "tcp://*:4442", "subscribe", "tcp://*:4443", "bind", true)));
}

From source file:com.example.endpoints.message.MessageV2Translator.java

public Map<String, String> fromInternalToExternal(Message internalMessage) {
    return ImmutableMap.of(MESSAGE_KEY, internalMessage.getMessage());
}

From source file:org.eclipse.mylyn.internal.wikitext.commonmark.ProcessingContext.java

public static ProcessingContext withReferenceDefinition(String name, String href, String title) {
    if (Strings.isNullOrEmpty(name)) {
        return empty();
    }//from  w  w w  .  ja  v a2s  .co m
    return new ProcessingContext(
            ImmutableMap.of(name.toLowerCase(Locale.ROOT), new NamedUriWithTitle(name, href, title)));
}

From source file:interns.MyTestController.java

@Route(method = HttpMethod.GET, uri = "/intern/test")
public Result test() {
    return ok(ImmutableMap.of("foo", "bar")).json();
}

From source file:org.jclouds.virtualbox.config.DefaultCacheNodeStoreModule.java

public DefaultCacheNodeStoreModule() {
    super(ImmutableMap.of("host", Node.builder().id("host").name("host installing virtualbox")
            .hostname("localhost").osFamily(OsFamily.LINUX.toString())
            .osDescription(System.getProperty("os.name")).osVersion(System.getProperty("os.version"))
            .group("ssh").username(System.getProperty("user.name"))
            .credentialUrl(URI.create("file://" + System.getProperty("user.home") + "/.ssh/id_rsa")).build()));
}

From source file:org.codice.ddf.catalog.ui.security.ShareableMetacardSharingPolicyPlugin.java

private static Map<String, Set<String>> getOwnerPermission(String owner) {
    return ImmutableMap.of(Core.METACARD_OWNER, ImmutableSet.of(owner));
}

From source file:com.opengamma.strata.measure.swaption.SwaptionMarketDataLookup.java

/**
 * Obtains an instance based on a single mapping from index to volatility identifier.
 * <p>/* ww w. ja  v  a 2s.com*/
 * The lookup provides volatilities for the specified index.
 *
 * @param index  the Ibor index
 * @param volatilityId  the volatility identifier
 * @return the swaption lookup containing the specified mapping
 */
public static SwaptionMarketDataLookup of(IborIndex index, SwaptionVolatilitiesId volatilityId) {
    return DefaultSwaptionMarketDataLookup.of(ImmutableMap.of(index, volatilityId));
}

From source file:org.gradle.nativeplatform.toolchain.internal.plugins.StandardToolChainsPlugin.java

public void apply(Project project) {
    project.apply(ImmutableMap.of("type", MicrosoftVisualCppPlugin.class));
    project.apply(ImmutableMap.of("type", GccCompilerPlugin.class));
    project.apply(ImmutableMap.of("type", ClangCompilerPlugin.class));
}

From source file:org.apache.druid.guice.DruidProcessingConfigModule.java

@Override
public void configure(Binder binder) {
    ConfigProvider.bind(binder, DruidProcessingConfig.class, ImmutableMap.of("base_path", "druid.processing"));
}