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.flite.cach3.config.ConfigurationHelper.java

public static String addVelocityContextItems(final VelocityContextFactory factory, final String key,
        final Object value) {
    if (factory == null) {
        throw new InvalidParameterException("VelocityContextFactory must be defined.");
    }// w ww . j ava2 s  . c  o m
    factory.addVelocityContextItems(ImmutableMap.of(key, value));
    return key;
}

From source file:com.opengamma.strata.measure.bond.BondFutureOptionMarketDataLookup.java

/**
 * Obtains an instance based on a single mapping from security ID to volatility identifier.
 * <p>// w  w  w  .j ava2 s. c  om
 * The lookup provides volatilities for the specified security ID.
 *
 * @param securityId  the security ID
 * @param volatilityId  the volatility identifier
 * @return the bond future options lookup containing the specified mapping
 */
public static BondFutureOptionMarketDataLookup of(SecurityId securityId,
        BondFutureVolatilitiesId volatilityId) {
    return DefaultBondFutureOptionMarketDataLookup.of(ImmutableMap.of(securityId, volatilityId));
}

From source file:com.ebay.pulsar.analytics.dao.service.DBRightGroupService.java

public int deleteRightsFromGroupByPrefix(String rightNamePrefix) {
    String prefix = rightNamePrefix.endsWith("%") ? rightNamePrefix : rightNamePrefix + "%";
    return execute("delete from " + QUTOA + getTableName() + QUTOA + "  where rightName like :rightName",
            ImmutableMap.of("rightName", prefix));
}

From source file:com.opengamma.strata.measure.index.IborFutureOptionMarketDataLookup.java

/**
 * Obtains an instance based on a single mapping from index to volatility identifier.
 * <p>//from   w  w w.  ja v a  2  s  .  c  o m
 * The lookup provides volatilities for the specified index.
 *
 * @param index  the Ibor index
 * @param volatilityId  the volatility identifier
 * @return the Ibor future option lookup containing the specified mapping
 */
public static IborFutureOptionMarketDataLookup of(IborIndex index,
        IborFutureOptionVolatilitiesId volatilityId) {
    return DefaultIborFutureOptionMarketDataLookup.of(ImmutableMap.of(index, volatilityId));
}

From source file:com.google.api.codegen.py.PythonInterfaceInitializer.java

@Override
public ImmutableMap<String, Object> getGlobalMap(Interface iface) {
    return ImmutableMap.of("pyproto", (Object) new PythonProtoElements());
}

From source file:alluxio.SetAndRestoreConfiguration.java

/**
 * @param key the key of the configuration property to set
 * @param value the value to set it to/*from  w w  w.j a  v  a  2 s  . c o m*/
 */
public SetAndRestoreConfiguration(PropertyKey key, String value) {
    this(ImmutableMap.of(key, value));
}

From source file:com.linecorp.armeria.server.thrift.ThriftCallService.java

/**
 * Creates a new {@link ThriftCallService} with the specified service implementation.
 *
 * @param implementation an implementation of {@code *.Iface} or {@code *.AsyncIface} service interface
 *                       generated by the Apache Thrift compiler
 *///from  w  w  w  .  ja  v  a2s  .c o m
public static ThriftCallService of(Object implementation) {
    return new ThriftCallService(ImmutableMap.of("", implementation));
}

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

static CommandPayload GET(String url) {
    return new CommandPayload(GET, ImmutableMap.of("url", url));
}

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

public void setValue(CharSequence... keysToSend) {
    WebDriverLikeRequest request = buildRequest(WebDriverLikeCommand.SET_VALUE,
            ImmutableMap.of("value", keysToSend));
    commandExecutor.execute(request);/* ww w  .ja  v a 2  s. c  o  m*/
}

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

@Override
public void setValue(boolean value) {
    WebDriverLikeRequest request = buildRequest(WebDriverLikeCommand.NATIVE_SWITCH_SET_VALUE,
            ImmutableMap.of("value", value));

    commandExecutor.execute(request);/* w ww. j a  va  2 s.co m*/
}