Example usage for com.google.common.collect ImmutableSet copyOf

List of usage examples for com.google.common.collect ImmutableSet copyOf

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSet copyOf.

Prototype

public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements) 

Source Link

Usage

From source file:org.gradle.language.nativeplatform.internal.incremental.BuildableCompilationState.java

public CompilationState snapshot() {
    return new CompilationState(ImmutableSet.copyOf(sourceInputs), ImmutableMap.copyOf(fileStates));
}

From source file:org.onosproject.cord.gui.model.DefaultBundleDescriptor.java

/**
 * Constructs a bundle descriptor./*w ww. j  a v a 2s .  c o m*/
 *
 * @param id bundle identifier
 * @param displayName bundle display name
 * @param functions functions that make up this bundle
 */
DefaultBundleDescriptor(String id, String displayName, String description, XosFunctionDescriptor... functions) {
    this.id = id;
    this.displayName = displayName;
    this.description = description;
    this.functions = ImmutableSet.copyOf(functions);
}

From source file:org.openqa.selenium.docker.ImageSummary.java

public ImageSummary(ImageId id, Collection<String> repoTags) {
    this.id = Objects.requireNonNull(id);
    this.repoTags = ImmutableSet.copyOf(Objects.requireNonNull(repoTags));
}

From source file:com.palantir.giraffe.file.base.attribute.DynamicAttributeAccessor.java

public Map<String, Object> readAttributes(String attributes) throws IOException {
    ImmutableSet<String> attributeSet = ImmutableSet.copyOf(attributes.split(","));
    if (attributeSet.contains("*")) {
        return readAllAttributes();
    } else {//  w w w  .  jav a 2  s  .c  o  m
        return readAttributes(attributeSet);
    }
}

From source file:com.facebook.buck.android.GenProGuardConfigStep.java

public GenProGuardConfigStep(Path androidManifestPath, Set<Path> resDirectories,
        Path proguardConfigurationPath) {
    this.androidManifestPath = Preconditions.checkNotNull(androidManifestPath);
    this.resDirectories = ImmutableSet.copyOf(resDirectories);
    this.proguardConfigurationPath = Preconditions.checkNotNull(proguardConfigurationPath);
}

From source file:org.jclouds.rest.internal.GetAcceptHeaders.java

@Override
public Set<String> apply(Invocation invocation) {
    Optional<Consumes> accept = Optional.fromNullable(invocation.getInvokable().getAnnotation(Consumes.class))
            .or(Optional.fromNullable(
                    invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Consumes.class)));
    return (accept.isPresent()) ? ImmutableSet.copyOf(accept.get().value()) : ImmutableSet.<String>of();
}

From source file:com.b2international.snowowl.snomed.datastore.id.request.AbstractSnomedIdentifierEnumeratedRequestBuilder.java

public B setComponentIds(Set<String> componentIds) {
    this.componentIds = ImmutableSet.copyOf(componentIds);
    return getSelf();
}

From source file:org.celeria.minecraft.backup.WorldListProvider.java

@Override
public Iterable<World> get() {
    final List<String> worldNames = configuration.getStringList("worlds", ImmutableList.<String>of());
    final List<World> worlds = server.getWorlds();
    if (worldNames.isEmpty()) {
        return worlds;
    }//from w w w .  j a v a2s.  co m
    return filteredWorldListFrom(ImmutableSet.copyOf(worldNames), worlds);
}

From source file:net.brtly.monkeyboard.api.event.DeviceListChangedEvent.java

/**
 * Create an instance of this event/*from   w ww  . ja v  a 2  s.co m*/
 * 
 * @param deviceList
 *            a Collection of strings representing the connected device's
 *            serial numbers
 */
public DeviceListChangedEvent(Collection<String> deviceList) {
    _deviceList = ImmutableSet.copyOf(deviceList);
}

From source file:suneido.database.immudb.ForeignKeyTargets.java

ForeignKeyTargets without(ForeignKey source, ForeignKeyTarget target) {
    Set<ForeignKeyTarget> cur = targets.get(source);
    ImmutableSet<ForeignKeyTarget> wo = ImmutableSet
            .copyOf(Iterables.filter(cur, Predicates.not(Predicates.equalTo(target))));
    return new ForeignKeyTargets(targets.with(source, wo));
}