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

@Override
public Set<? extends MutationInterface> computePotentialMutations(final ManagedCellInterface cell,
        final SideInterface side) {
    return ImmutableSet.of(AtomicMutationFactory.newBirth(cell, side, TicTacToePieceSet.PAWN));
}

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

/**
 * @param zoneId/*from w  w w .j av a 2  s. com*/
 *           the ID of the zone
 */
public AddSecondaryStorageOptions zoneId(String zoneId) {
    this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
    return this;
}

From source file:com.google.gerrit.server.plugins.DisablePlugin.java

@Override
public Object apply(PluginResource resource, Input input) {
    String name = resource.getName();
    loader.disablePlugins(ImmutableSet.of(name));
    return new ListPlugins.PluginInfo(loader.get(name));
}

From source file:org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.java

/**
 * Constructs a new typed event subscriber. Must be called in the subclass.
 *
 * @param eventType the event type//from   www.java2  s  .c o  m
 */
protected AbstractTypedEventSubscriber(String eventType) {
    this.subscribedEventTypes = ImmutableSet.of(eventType);
}

From source file:com.facebook.buck.apple.AppleResources.java

/**
 * Collect resources from recursive dependencies.
 *
 * @param targetGraph The {@link TargetGraph} containing the node and its dependencies.
 * @param targetNodes {@link TargetNode} at the tip of the traversal.
 * @return The recursive resource buildables.
 *///  w w  w . jav a 2  s  .co m
public static ImmutableSet<AppleResourceDescription.Arg> collectRecursiveResources(
        final TargetGraph targetGraph, final Optional<AppleDependenciesCache> cache,
        Iterable<? extends TargetNode<?, ?>> targetNodes) {
    return FluentIterable.from(targetNodes)
            .transformAndConcat(AppleBuildRules.newRecursiveRuleDependencyTransformer(targetGraph, cache,
                    AppleBuildRules.RecursiveDependenciesMode.COPYING,
                    ImmutableSet.of(AppleResourceDescription.class)))
            .transform(input -> (AppleResourceDescription.Arg) input.getConstructorArg()).toSet();
}

From source file:com.spotify.heroic.aggregation.simple.TemplateInstance.java

@JsonCreator
public TemplateInstance(@JsonProperty("size") final long size, @JsonProperty("extent") final long extent) {
    super(size, extent, ImmutableSet.of(MetricType.POINT), MetricType.POINT);
}

From source file:grakn.core.graql.gremlin.sets.DataTypeFragmentSet.java

@Override
public final Set<Fragment> fragments() {
    return ImmutableSet.of(Fragments.dataType(varProperty(), attributeType(), dataType()));
}

From source file:com.opengamma.examples.function.ExampleForexSpotRateMarketDataFunction.java

@Override
public Set<ValueRequirement> getRequirements(FunctionCompilationContext context, ComputationTarget target,
        ValueRequirement desiredValue) {
    UnorderedCurrencyPair currencyPair = UnorderedCurrencyPair
            .of(desiredValue.getTargetSpecification().getUniqueId());
    final ValueRequirement spotRequirement = new ValueRequirement(MarketDataRequirementNames.MARKET_VALUE,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER,
                    currencyPair.getFirstCurrency().getCode() + currencyPair.getSecondCurrency().getCode()));
    return ImmutableSet.of(spotRequirement);
}

From source file:concretisations.othello.pieces.Null.java

@Override
public Set<? extends MutationInterface> computePotentialMutations(final ManagedCellInterface cell,
        final SideInterface side) {
    if (this.isMutable(cell, side)) {
        return ImmutableSet.of(OthelloMutationFactory.newPawnMutation(cell, side)); // NOPMD 
    }//  ww w  .j  a  v a2 s  .  co  m
    return MutationInterface.NULL_POTENTIAL_MUTATION_SET;

}

From source file:com.b2international.snowowl.datastore.request.BranchSearchRequestBuilder.java

public BranchSearchRequestBuilder filterByParent(String parentPath) {
    return filterByParent(ImmutableSet.of(parentPath));
}