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.gradle.api.plugins.GroovyPlugin.java

public void apply(Project project) {
    project.apply(ImmutableMap.of("type", GroovyBasePlugin.class));
    project.apply(ImmutableMap.of("type", JavaPlugin.class));
    configureGroovydoc(project);//from  ww w  .  j a va 2 s.  c o  m
}

From source file:nl.knaw.huygens.alexandria.config.MockConfiguration.java

@Override
public Map<String, String> getAuthKeyIndex() {
    return ImmutableMap.of("123456", "testuser");
}

From source file:eda.web.WebModule.java

@Override
protected void configureServlets() {
    bind(WebResourceServlet.class).in(Singleton.class);

    filter("/*").through(SecurityFilter.class, ImmutableMap.of("exclude", ""));

    serve("/async/*").with(GuiceCometdServlet.class);

    serve("/static/*").with(WebResourceServlet.class, ImmutableMap.of(WebResourceServlet.DESCRIPTOR,
            "virtual-resources.xml", "debug", System.getProperty("debug.static", "false")));

    serve("/service/*").with(GuiceContainer.class, ImmutableMap
            .of("com.sun.jersey.spi.container.ContainerResponseFilters", GzipEncoder.class.getName()));
}

From source file:org.jclouds.rimuhosting.miro.binder.RimuHostingRebootJsonBinder.java

@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, String> postParams) {
    return super.bindToRequest(request, (Object) ImmutableMap.of("running_state", "RESTARTING"));
}

From source file:org.uiautomation.ios.client.uiamodels.impl.RemoteUIATextView.java

@Override
public void setValue(CharSequence... keysToSend) {

    WebDriverLikeRequest request = buildRequest(WebDriverLikeCommand.SET_VALUE,
            ImmutableMap.of("value", keysToSend));
    commandExecutor.execute(request);/*from  ww  w. j a  v a  2 s. com*/
}

From source file:co.cask.cdap.client.app.FakeProcedure.java

@Handle(METHOD_NAME)
public void handle(ProcedureRequest request, ProcedureResponder responder) throws IOException {
    String word = request.getArgument("customer");
    responder.sendJson(ImmutableMap.of("customer", "real" + word));
}

From source file:org.terasology.dialogs.action.CloseDialogActionTypeHandler.java

@Override
public PersistedData serialize(CloseDialogAction action, SerializationContext context) {
    Map<String, PersistedData> data = ImmutableMap.of("type",
            context.create(action.getClass().getSimpleName()));

    return context.create(data);
}

From source file:eu.itesla_project.computation.mpi.MpiComputationResourcesStatus.java

@Override
public Map<String, Integer> getBusyCoresPerApp() {
    return ImmutableMap.of("all", busyCores);
}

From source file:omakase.semantics.LocalVariableLookupContext.java

public LocalVariableLookupContext(IdentifierLookupContext outerContext, LocalVariableSymbol local) {
    this(outerContext, ImmutableMap.of(local.name, local));
}

From source file:co.cask.cdap.etl.mock.batch.NodeStatesAction.java

public static ETLPlugin getPlugin(String tableName) {
    return new ETLPlugin("TokenWriter", PostAction.PLUGIN_TYPE, ImmutableMap.of("tableName", tableName), null);
}