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.ListAlertsOptions.java

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

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

/**
 * @param forced Force delete the host. All HA enabled vms running on the host will be put to HA; HA disabled ones will be stopped
 */// w  ww .java2s.  co  m
public DeleteHostOptions forced(boolean forced) {
    this.queryParameters.replaceValues("forced", ImmutableSet.of(forced + ""));
    return this;
}

From source file:org.sosy_lab.java_smt.api.visitors.TraversalProcess.java

/**
 * Traverse only the given child.//  w  ww .j  ava  2 s .  co  m
 *
 * <p>NOTE: any given which is <em>not</em> child of the given node will be ignored.
 */
public static TraversalProcess custom(Formula pToTraverse) {
    return new TraversalProcess(TraversalType.CUSTOM_TYPE, ImmutableSet.of(pToTraverse));
}

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

/**
 * @param name new name of the VMGroup//  www. jav a2  s .c om
 */
public UpdateVMGroupOptions name(String name) {
    this.queryParameters.replaceValues("name", ImmutableSet.of(name));
    return this;
}

From source file:com.opengamma.bbg.referencedata.impl.AbstractReferenceDataProvider.java

@Override
public String getReferenceDataValue(String identifier, String dataField) {
    return getReferenceDataValues(ImmutableSet.of(identifier), dataField).get(identifier);
}

From source file:org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassNestedClassifierListenerEditPolicy.java

/**
 * /* w w  w.j ava 2 s  .  c om*/
 * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.ListenerEventEditPolicy#getEStructuralFeaturesToListen()
 * 
 * @return {@link ImmutableSet}
 */
public ImmutableSet<EStructuralFeature> getEStructuralFeaturesToListen() {
    return ImmutableSet.of((EStructuralFeature) UMLPackage.Literals.CLASS__NESTED_CLASSIFIER);
}

From source file:com.opengamma.financial.currency.FixedIncomeInstrumentPnLSeriesCurrencyConversionFunction.java

@Override
public Set<ValueSpecification> getResults(final FunctionCompilationContext context,
        final ComputationTarget target) {
    final ValueProperties properties = createValueProperties().withAny(ValuePropertyNames.CURRENCY)
            .withAny(ValuePropertyNames.SAMPLING_PERIOD).withAny(ValuePropertyNames.SCHEDULE_CALCULATOR)
            .withAny(ValuePropertyNames.SAMPLING_FUNCTION)
            .with(YieldCurveNodePnLFunction.PROPERTY_PNL_CONTRIBUTIONS, "Delta").get();
    return ImmutableSet
            .of(new ValueSpecification(ValueRequirementNames.PNL_SERIES, target.toSpecification(), properties));
}

From source file:org.eclipse.smarthome.binding.astro.discovery.AstroDiscoveryService.java

/**
 * Creates a AstroDiscoveryService with disabled autostart.
 *///from w w  w. j av a  2 s. c  o  m
public AstroDiscoveryService() {
    super(ImmutableSet.of(new ThingTypeUID(BINDING_ID, "-")), DISCOVER_TIMEOUT_SECONDS, false);
}

From source file:com.facebook.buck.rules.FakeBuildRuleParams.java

public FakeBuildRuleParams(BuildTarget buildTarget, ImmutableSortedSet<BuildRule> deps) {
    this(buildTarget, deps, /* visibilityPatterns */ ImmutableSet.of(BuildTargetPattern.MATCH_ALL));
}

From source file:org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InterfaceNestedClassifierListenerEditPolicy.java

/**
 * /*from   w w  w. j av  a 2 s  . c o  m*/
 * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.ListenerEventEditPolicy#getEStructuralFeaturesToListen()
 * 
 * @return {@link ImmutableSet}
 */
public ImmutableSet<EStructuralFeature> getEStructuralFeaturesToListen() {
    return ImmutableSet.of((EStructuralFeature) UMLPackage.Literals.INTERFACE__NESTED_CLASSIFIER);
}