List of usage examples for com.google.common.collect ImmutableMap of
public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2)
From source file:org.apache.sqoop.shell.RevokeCommand.java
public RevokeCommand(Shell shell) { super(shell, Constants.CMD_REVOKE, Constants.CMD_REVOKE_SC, ImmutableMap.of(Constants.FN_ROLE, RevokeRoleFunction.class, Constants.FN_PRIVILEGE, RevokePrivilegeFunction.class)); }
From source file:org.apache.sqoop.shell.EnableCommand.java
public EnableCommand(Shell shell) { super(shell, Constants.CMD_ENABLE, Constants.CMD_ENABLE_SC, ImmutableMap.of(Constants.FN_LINK, EnableLinkFunction.class, Constants.FN_JOB, EnableJobFunction.class)); }
From source file:org.apache.sqoop.shell.DisableCommand.java
public DisableCommand(Shell shell) { super(shell, Constants.CMD_DISABLE, Constants.CMD_DISABLE_SC, ImmutableMap.of(Constants.FN_LINK, DisableLinkFunction.class, Constants.FN_JOB, DisableJobFunction.class)); }
From source file:com.bjond.utilities.NetworkUtils.java
/** * This override allows us to specify an id. This is useful in a create case where * the client does not yet have a GUID for the object it is creating. * /*from www .j a v a 2 s . co m*/ * @param message The message. * @param id ID of the newly created object. * @return The data to send back to the client. */ public static Map<String, String> generateSuccessMap( @NotNull(message = "message must not be null.") String message, @NotNull(message = "id must not be null.") String id) { return ImmutableMap.of("status", message, "id", id); }
From source file:com.google.gitiles.BaseServlet.java
public static Map<String, String> menuEntry(String text, String url) { if (url != null) { return ImmutableMap.of("text", text, "url", url); } else {//from ww w. j a v a2 s .c o m return ImmutableMap.of("text", text); } }
From source file:org.apache.druid.java.util.emitter.service.ServiceEventBuilder.java
public X build(String service, String host) { return build(ImmutableMap.of("service", service, "host", host)); }
From source file:org.fenixedu.start.service.FenixEduStartExtension.java
@Override public Map<String, Filter> getFilters() { return ImmutableMap.of("path", new Filter() { @Override//from w w w. j av a 2 s . c o m public Object apply(Object input, Map<String, Object> args) { if (input instanceof String) { return ((String) input).replace('.', '/'); } return input; } @Override public List<String> getArgumentNames() { return null; } }, "latest", new Filter() { @Override public Object apply(Object input, Map<String, Object> args) { if (input instanceof List) { List<? extends Comparable> list = (List<? extends Comparable>) input; Collections.sort(list, Comparator.<Comparable>reverseOrder()); return list.isEmpty() ? null : list.get(0); } return input; } @Override public List<String> getArgumentNames() { return null; } }); }
From source file:org.apache.sqoop.shell.CloneCommand.java
public CloneCommand(Shell shell) { super(shell, Constants.CMD_CLONE, Constants.CMD_CLONE_SC, ImmutableMap.of(Constants.FN_LINK, CloneLinkFunction.class, Constants.FN_JOB, CloneJobFunction.class)); }
From source file:org.openqa.selenium.devtools.Target.java
public static Command<Void> setAutoAttach(boolean autoAttach) { return new Command<>("Target.setAutoAttach", ImmutableMap.of("autoAttach", autoAttach, "waitForDebuggerOnStart", false), Void.class); }
From source file:com.eviware.loadui.impl.layout.LabelLayoutComponentImpl.java
public LabelLayoutComponentImpl(String label, String constraints) { this(ImmutableMap.of(LABEL, label, CONSTRAINTS, constraints)); }