Example usage for com.google.common.collect ImmutableSet of

List of usage examples for com.google.common.collect ImmutableSet of

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSet of.

Prototype

public static <E> ImmutableSet<E> of(E element) 

Source Link

Usage

From source file:concretisations.life.pieces.Pawn.java

@Override
public Set<? extends MutationInterface> computePotentialMutations(final ManagedCellInterface cell,
        final SideInterface side) {
    final int n = this.count(cell);
    if (n < Pawn.MIN || n > Pawn.MAX) {
        return ImmutableSet.of(AtomicMutationFactory.newDeath(cell)); // NOPMD
    }// ww w .  j a v  a2 s.  co  m
    return MutationInterface.NULL_POTENTIAL_MUTATION_SET;
}

From source file:org.jclouds.cloudstack.options.ListCapacityOptions.java

public ListCapacityOptions keyword(String keyword) {
    this.queryParameters.replaceValues("keyword", ImmutableSet.of(keyword));
    return this;
}

From source file:org.jclouds.cloudstack.options.ListDiskOfferingsOptions.java

/**
 * @param id// w w w.  j  av a 2s . c  o  m
 *           the ID of the disk offering
 */
public ListDiskOfferingsOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

From source file:org.jclouds.cloudstack.options.ListDomainsOptions.java

/**
 * @param id// w  ww  .j  av a  2  s . c om
 *    firewall rule ID
 */
public ListDomainsOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

From source file:google.registry.tools.server.ListReservedListsAction.java

@Override
public ImmutableSet<String> getPrimaryKeyFields() {
    return ImmutableSet.of("name");
}

From source file:org.jclouds.cloudstack.options.ListIPForwardingRulesOptions.java

/**
 * @param id/* w w  w.  j  a v  a  2 s.  co m*/
 *           Lists rule with the specified ID.
 */
public ListIPForwardingRulesOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

From source file:org.jclouds.cloudstack.options.AssociateIPAddressOptions.java

/**
 * @param networkId//w w  w.  j  av a  2  s .c o  m
 *           The network this ip address should be associated to.
 */
public AssociateIPAddressOptions networkId(String networkId) {
    this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + ""));
    return this;

}

From source file:org.jclouds.cloudsigma.util.Servers.java

/**
 * Helper to create a small persistent server
 * // w ww.j  a  v  a 2  s . c o m
 * @param name
 *           what to name the server
 * @param driveUuuid
 *           id of the boot drive
 * @param vncPassword
 *           password for vnc
 * @param ip
 *           static IP
 * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
 */
public static Server.Builder smallWithStaticIP(String name, String driveUuuid, String vncPassword, String ip) {
    return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
            .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
            .bootDeviceIds(ImmutableSet.of("ide:0:0"))
            .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp(ip).build()))
            .vnc(new VNC(null, vncPassword, false));
}

From source file:org.jclouds.cloudstack.options.ListPortForwardingRulesOptions.java

/**
 * @param id//from ww w  .  j av a  2 s.c  o m
 *       lists rule with the specified ID
 */
public ListPortForwardingRulesOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

From source file:org.lenskit.data.entities.EntityDerivation.java

/**
 * Create a new entity derivation./*from   www  .j a  v  a2 s .c  o m*/
 * @param t The derived entity type.
 * @param src The source type.
 * @param attr The attribute to derive from.
 * @return An entity derivation.
 */
public static EntityDerivation create(EntityType t, EntityType src, TypedName<Long> attr) {
    ImmutableSet<EntityType> sts = ImmutableSet.of(src);
    return new EntityDerivation(t, sts, attr);
}