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:com.publictransitanalytics.scoregenerator.testhelpers.PreloadedTripDetailsDirectory.java

@Override
public Set<TripDetails> getAllTripDetails() {
    return ImmutableSet.copyOf(map.values());
}

From source file:com.b2international.snowowl.snomed.datastore.index.constraint.EnumeratedDefinitionFragment.java

@JsonCreator
public EnumeratedDefinitionFragment(@JsonProperty("uuid") final String uuid,
        @JsonProperty("active") final boolean active, @JsonProperty("effectiveTime") final long effectiveTime,
        @JsonProperty("author") final String author, @JsonProperty("conceptIds") final Set<String> conceptIds) {

    super(uuid, active, effectiveTime, author);
    this.conceptIds = ImmutableSet.copyOf(conceptIds);
}

From source file:org.onosproject.cluster.PartitionDiff.java

public PartitionDiff(Partition oldValue, Partition newValue) {
    this.oldValue = oldValue;
    this.newValue = newValue;
    this.partitionId = oldValue.getId();
    this.currentMembers = oldValue == null ? ImmutableSet.of() : ImmutableSet.copyOf(oldValue.getMembers());
    this.newMembers = newValue == null ? ImmutableSet.of() : ImmutableSet.copyOf(newValue.getMembers());
}

From source file:org.onosproject.store.cluster.impl.ClusterDefinition.java

/**
 * Returns set of cluster nodes info.
 * @return cluster nodes info
 */
public Set<NodeInfo> getNodes() {
    return ImmutableSet.copyOf(nodes);
}

From source file:com.github.nyrkovalex.deploy.me.descriptor.Fileset.java

public Fileset(String name, Iterable<Script> scripts) {
    super(name);
    this.scripts = ImmutableSet.copyOf(scripts);
}

From source file:org.onosproject.incubator.net.routing.RouteSet.java

/**
 * Creates a new route set./*from w  w  w. j av a 2 s.c  o m*/
 *
 * @param tableId route table ID
 * @param prefix IP prefix
 * @param routes routes for the given prefix
 */
public RouteSet(RouteTableId tableId, IpPrefix prefix, Set<Route> routes) {
    this.tableId = checkNotNull(tableId);
    this.prefix = checkNotNull(prefix);
    this.routes = ImmutableSet.copyOf(checkNotNull(routes));
}

From source file:org.springframework.ide.eclipse.boot.dash.test.mocks.MockMultiSelection.java

@SuppressWarnings("unchecked")
public void setElements(T... newElements) {
    setElements(ImmutableSet.copyOf(newElements));
}

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

public AidlStep(Path aidlFilePath, Set<String> importDirectoryPaths, Path destinationDirectory) {
    this.aidlFilePath = Preconditions.checkNotNull(aidlFilePath);
    this.importDirectoryPaths = ImmutableSet.copyOf(importDirectoryPaths);
    this.destinationDirectory = Preconditions.checkNotNull(destinationDirectory);
}

From source file:com.github.nyrkovalex.deploy.me.descriptor.Application.java

public Application(String name, Iterable<Server> servers) {
    super(name);
    this.servers = ImmutableSet.copyOf(servers);
}