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:org.jclouds.cloudstack.options.RegisterISOOptions.java

/**
 * @param bootable true if this ISO is bootable
 *//*from   ww  w . j  ava2 s. co  m*/
public RegisterISOOptions bootable(boolean bootable) {
    this.queryParameters.replaceValues("bootable", ImmutableSet.of(bootable + ""));
    return this;
}

From source file:com.github.benmanes.caffeine.cache.simulator.policy.product.Cache2kPolicy.java

/** Returns all variations of this policy based on the configuration parameters. */
public static Set<Policy> policies(Config config) {
    return ImmutableSet.of(new Cache2kPolicy(config));
}

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

/**
 * @param keyword List by keyword//w  ww  . j ava2s .c  om
 */
public ListSnapshotPoliciesOptions keyword(String keyword) {
    this.queryParameters.replaceValues("keyword", ImmutableSet.of(keyword + ""));
    return this;
}

From source file:com.google.errorprone.bugpatterns.ArgumentParameterSimilarityMetrics.java

/**
 * Divides a string into a set of terms by splitting on underscores and transitions from lower to
 * upper case./*from w  w  w.  j ava 2  s. co  m*/
 */
@VisibleForTesting
static Set<String> splitStringTerms(String name) {
    if (ONLY_UNDERSCORES.matcher(name).matches()) {
        // Degenerate case of names which contain only underscore
        return ImmutableSet.of(name);
    }
    // TODO(andrewrice): switch over to toImmutableSet if guava provides it in future
    return Arrays.stream(UNDERSCORES_OR_CASE_TRANSITIONS.split(name)).map(String::toLowerCase)
            .collect(toCollection(HashSet::new));
}

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

/**
 * @param name/*  w  w  w.  j av a 2  s .  c  om*/
 *       the new name for this domain
 */
public UpdateDomainOptions name(String name) {
    this.queryParameters.replaceValues("name", ImmutableSet.of(name));
    return this;
}

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

/**
 * @param account account who owns the VMGroup
 *//*  w  w w .j a v  a  2  s.  com*/
public CreateVMGroupOptions account(String account) {
    this.queryParameters.replaceValues("account", ImmutableSet.of(account));
    return this;
}

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

/**
 * 32 or 64 bits support. 64 by default/*from   w  w  w  . ja va 2 s.c o  m*/
 */
public RegisterTemplateOptions bits(int bits) {
    this.queryParameters.replaceValues("bits", ImmutableSet.of(bits + ""));
    return this;
}

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

/**
 * 32 or 64 bit//from w  w  w  .  j ava2s .  co  m
 */
public CreateTemplateOptions bits(int bits) {
    this.queryParameters.replaceValues("bits", ImmutableSet.of(bits + ""));
    return this;
}

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

/**
 * @param policyId policy id of the snapshot, if this is null, then use MANUAL_POLICY.
 *///from w w  w  .j a v a  2  s.c  o m
public CreateSnapshotOptions policyId(String policyId) {
    this.queryParameters.replaceValues("policyid", ImmutableSet.of(policyId + ""));
    return this;
}

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

/**
 * List volumes on specified host//from ww w.  java 2  s .  co m
 *
 * @param hostId hostId.
 */
public ListVolumesOptions hostId(String hostId) {
    this.queryParameters.replaceValues("hostid", ImmutableSet.of(hostId + ""));
    return this;
}