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.connect4.pieces.Null.java

@Override
public Set<? extends MutationInterface> computePotentialMutations(final ManagedCellInterface cell,
        final SideInterface side) {
    if (cell.isEmpty() && !cell.getNeihgbour(NamedDirection.BOTTOM).isEmpty()) {
        return ImmutableSet.of(AtomicMutationFactory.newBirth(cell, side, Connect4PieceSet.PAWN)); // NOPMD
    }/*  w  w w . ja  va 2 s .c  om*/
    return MutationInterface.NULL_POTENTIAL_MUTATION_SET;
}

From source file:com.github.benmanes.caffeine.cache.simulator.policy.opt.ClairvoyantPolicy.java

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

From source file:com.github.imasahiro.stringformatter.processor.specifier.BooleanFormatConversionType.java

@Override
public Set<TypeMirror> getType(Types typeUtil, Elements elementUtil) {
    return ImmutableSet.of(typeUtil.getPrimitiveType(TypeKind.BOOLEAN));
}

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

/**
 * @param forced//www . ja  v  a2  s  . c  o  m
 *           Whether to force stop the virtual machine. Defaults to false.
 */
public StopVirtualMachineOptions forced(boolean forced) {
    this.queryParameters.replaceValues("forced", ImmutableSet.of(forced + ""));
    return this;
}

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

/**
 * @param id//from  www  .j a  va  2s.  c  o  m
 *           list projects by project ID
 */
public ListProjectsOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id));
    return this;
}

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

/**
 * @param id/*from   w ww  . j a  va2s  .  c o m*/
 *           the ID of the service offering
 */
public ListServiceOfferingsOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

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

/**
 * @param allocationState Allocation state of this Host for allocation of new resources
 *///from  w  ww  . ja v  a2  s .co  m
public UpdateHostOptions allocationState(AllocationState allocationState) {
    this.queryParameters.replaceValues("allocationstate", ImmutableSet.of(allocationState.toString()));
    return this;
}

From source file:com.teradata.tempto.kerberos.KerberosAuthentication.java

public KerberosAuthentication(String principal, String keytab) {
    requireNonNull(principal, "principal is null");
    requireNonNull(keytab, "keytab is null");
    this.principalsSet = ImmutableSet.of(new KerberosPrincipal(principal));
    this.kerberosConfiguration = createKerberosConfiguration(principal, keytab);
}

From source file:com.codebullets.sagalib.description.DescriptionSaga.java

@Override
public Collection<KeyReader> keyReaders() {
    return ImmutableSet
            .of(KeyReaders.forMessage(DescriptionFinishMessage.class, DescriptionFinishMessage::key));
}

From source file:ai.grakn.graql.internal.gremlin.fragment.DistinctCastingFragment.java

@Override
public Set<VarName> getDependencies() {
    return ImmutableSet.of(otherCastingName);
}