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, K k2, V v2) 

Source Link

Usage

From source file:org.openqa.selenium.grid.commands.DefaultStandaloneConfig.java

DefaultStandaloneConfig() {
    super(ImmutableMap.of("events", ImmutableMap.of("publish", "inproc://standalone-pub", "subscribe",
            "inproc://standalone-sub", "bind", true), "node", ImmutableMap.of("detect-drivers", true)));
}

From source file:com.android.build.gradle.integration.common.fixture.app.HelloWorldLibraryApp.java

public HelloWorldLibraryApp() {
    super(ImmutableMap.of(":app", new EmptyAndroidTestApp(), ":lib", HelloWorldApp.noBuildFile()));

    AndroidTestApp app = (AndroidTestApp) getSubproject(":app");

    // Create AndroidManifest.xml that uses the Activity from the library.
    app.addFile(new TestSourceFile("src/main", "AndroidManifest.xml",
            "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
                    + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n"
                    + "      package=\"com.example.app\"\n" + "      android:versionCode=\"1\"\n"
                    + "      android:versionName=\"1.0\">\n" + "\n"
                    + "    <uses-sdk android:minSdkVersion=\"3\" />\n"
                    + "    <application android:label=\"@string/app_name\">\n" + "        <activity\n"
                    + "            android:name=\"com.example.helloworld.HelloWorld\"\n"
                    + "            android:label=\"@string/app_name\">\n" + "            <intent-filter>\n"
                    + "                <action android:name=\"android.intent.action.MAIN\" />\n"
                    + "                <category android:name=\"android.intent.category.LAUNCHER\" />\n"
                    + "            </intent-filter>\n" + "        </activity>\n" + "    </application>\n"
                    + "</manifest>\n"));

}

From source file:org.usc.wechat.mp.sdk.util.platform.UserUtil.java

public static JsonRtn updateRemark(License license, String openId, String remark) {
    if (StringUtils.isEmpty(openId)) {
        return JsonRtnUtil.buildFailureJsonRtn(JsonRtn.class, "missing openId");
    }//from www.j a v a  2 s.  c  o  m

    if (StringUtils.isEmpty(remark)) {
        return JsonRtnUtil.buildFailureJsonRtn(JsonRtn.class, "missing remark");
    }

    Map<String, String> paramMap = ImmutableMap.of("openid", openId, "remark", remark);
    return HttpUtil.getRequest(WechatRequest.UPDATE_REMARK, license, paramMap, JsonRtn.class);
}

From source file:com.imaginarycode.minecraft.bungeejson.impl.handlers.bungeecord.PlayerCount.java

@Override
public Object handle(ApiRequest request) {
    return ImmutableMap.of("current_players", ProxyServer.getInstance().getOnlineCount(), "max_players", 99);
}

From source file:org.apache.sqoop.shell.SetCommand.java

protected SetCommand(Shell shell) {
    super(shell, Constants.CMD_SET, Constants.CMD_SET_SC, ImmutableMap.of(Constants.FN_SERVER,
            SetServerFunction.class, Constants.FN_OPTION, SetOptionFunction.class));
}

From source file:com.imaginarycode.minecraft.bungeejson.impl.handlers.bungeejson.Version.java

@Override
public Object handle(ApiRequest request) {
    return ImmutableMap.of("version", BungeeJSONPlugin.getPlugin().getDescription().getVersion(), "author",
            BungeeJSONPlugin.getPlugin().getDescription().getAuthor());
}

From source file:org.apache.sqoop.shell.GrantCommand.java

public GrantCommand(Shell shell) {
    super(shell, Constants.CMD_GRANT, Constants.CMD_GRANT_SC, ImmutableMap.of(Constants.FN_ROLE,
            GrantRoleFunction.class, Constants.FN_PRIVILEGE, GrantPrivilegeFunction.class));
}

From source file:org.apache.sqoop.shell.DeleteCommand.java

public DeleteCommand(Shell shell) {
    super(shell, Constants.CMD_DELETE, Constants.CMD_DELETE_SC, ImmutableMap.of(Constants.FN_LINK,
            DeleteLinkFunction.class, Constants.FN_JOB, DeleteJobFunction.class));
}

From source file:org.apache.sqoop.shell.CreateCommand.java

public CreateCommand(Shell shell) {
    super(shell, Constants.CMD_CREATE, Constants.CMD_CREATE_SC, ImmutableMap.of(Constants.FN_LINK,
            CreateLinkFunction.class, Constants.FN_JOB, CreateJobFunction.class));
}

From source file:org.apache.sqoop.shell.UpdateCommand.java

public UpdateCommand(Shell shell) {
    super(shell, Constants.CMD_UPDATE, Constants.CMD_UPDATE_SC, ImmutableMap.of(Constants.FN_LINK,
            UpdateLinkFunction.class, Constants.FN_JOB, UpdateJobFunction.class));
}