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

/**
 * @param id/*from ww  w . j  a v a2 s .c o m*/
 *           lists ip address by id
 */
public ListPublicIPAddressesOptions id(String id) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
    return this;
}

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

/**
 * @param allocationState Allocation state of this Host for allocation of new resources
 *//*from w  w w.jav a 2  s  .  c o m*/
public AddHostOptions allocationState(AllocationState allocationState) {
    this.queryParameters.replaceValues("allocationstate", ImmutableSet.of(allocationState.toString()));
    return this;
}

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

public GenerateUsageRecordsOptions domainId(String domainId) {
    this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
    return this;
}

From source file:org.hawkular.metrics.tasks.impl.TaskImpl.java

public TaskImpl(TaskType taskType, DateTime timeSlice, String target, String source, int interval, int window) {
    this.taskType = taskType;
    this.timeSlice = timeSlice;
    this.target = target;
    this.sources = ImmutableSet.of(source);
    this.interval = standardMinutes(interval);
    this.window = standardMinutes(window);
}

From source file:com.edduarte.argus.reader.PlainTextReader.java

@Override
public ImmutableSet<String> getSupportedContentTypes() {
    return ImmutableSet.of("text/plain");
}

From source file:org.jclouds.rackspace.config.RackspaceLocationsModule.java

@Provides
@Singleton/*from   www .j  av  a2  s  . c om*/
Set<? extends Location> provideLocations(@Provider String providerName) {
    Location provider = new LocationImpl(LocationScope.PROVIDER, providerName, providerName, null);
    return ImmutableSet.of(new LocationImpl(LocationScope.ZONE, "DFW1", "Dallas, TX", provider));
}

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

/**
 * @param parentDomainId/*from   www . ja v a 2  s  .  c o m*/
 *    firewall rule ID
 */
public ListDomainChildrenOptions parentDomainId(String parentDomainId) {
    this.queryParameters.replaceValues("id", ImmutableSet.of(parentDomainId + ""));
    return this;
}

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

@Override
public Object apply(PluginResource resource, Input input) throws ResourceConflictException {
    String name = resource.getName();
    try {//w  w  w  .  ja va2s . co m
        loader.enablePlugins(ImmutableSet.of(name));
    } catch (PluginInstallException e) {
        StringWriter buf = new StringWriter();
        buf.write(String.format("cannot enable %s\n", name));
        PrintWriter pw = new PrintWriter(buf);
        e.printStackTrace(pw);
        pw.flush();
        throw new ResourceConflictException(buf.toString());
    }
    return new ListPlugins.PluginInfo(loader.get(name));
}

From source file:com.cloudera.exhibit.core.simple.SimpleExhibitStore.java

@Override
public Set<String> entities() {
    return ImmutableSet.of(entity);
}

From source file:org.jclouds.labs.blobstore.exercise2.MultiFileUploader.java

public MultiFileUploader(String provider, String identity, String credential) {
    ctx = ContextBuilder.newBuilder(provider).credentials(identity, credential)
            .modules(ImmutableSet.of(new Log4JLoggingModule())).buildView(BlobStoreContext.class);
}