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.sosy_lab.java_smt.api.visitors.TraversalProcess.java

/**
 * Traverse only the given children./*  w  w w.  j  ava2s. c o m*/
 *
 * <p>NOTE: given formulas which are <em>not</em> children of the given node will be ignored.
 */
public static TraversalProcess custom(Iterable<? extends Formula> pToTraverse) {
    return new TraversalProcess(TraversalType.CUSTOM_TYPE, ImmutableSet.copyOf(pToTraverse));
}

From source file:org.onosproject.net.driver.DefaultDriverProvider.java

@Override
public Set<Driver> getDrivers() {
    return ImmutableSet.copyOf(drivers.values());
}

From source file:com.opengamma.util.annotation.AnnotationScannerImpl.java

@Override
public synchronized Set<Class<?>> scan(Class<? extends Annotation> annotationClass) {
    ArgumentChecker.notNull(annotationClass, "annotation class");

    AnnotationCache cache = AnnotationCache.load(annotationClass);
    final ClasspathScanner scanner = new ClasspathScanner();
    if (!scanner.getTimestamp().isAfter(cache.getTimestamp())) {
        s_logger.info("loading {} annotation from cache", annotationClass.getSimpleName());
        return ImmutableSet.copyOf(cache.getClasses());
    }//from   w w w.  j a v a2  s .c  om
    s_logger.info("Scanning class path for classes annotated with {}", annotationClass.getSimpleName());
    cache = scanner.scan(annotationClass);
    cache.save();
    return ImmutableSet.copyOf(cache.getClasses());
}

From source file:org.gradle.model.internal.manage.schema.extract.ModelPropertyExtractionResult.java

public ModelPropertyExtractionResult(ModelProperty<T> property,
        Iterable<PropertyAccessorExtractionContext> accessors) {
    this.property = property;
    this.accessors = ImmutableSet.copyOf(accessors);
}

From source file:io.prestosql.plugin.raptor.legacy.metadata.ShardNodes.java

public ShardNodes(UUID shardUuid, Set<String> nodeIdentifiers) {
    this.shardUuid = requireNonNull(shardUuid, "shardUuid is null");
    this.nodeIdentifiers = ImmutableSet.copyOf(requireNonNull(nodeIdentifiers, "nodeIdentifiers is null"));
}

From source file:com.facebook.presto.operator.StageExecutionStrategy.java

@JsonCreator
public static StageExecutionStrategy jsonCreator(
        @JsonProperty("groupedExecutionScanNodes") Set<PlanNodeId> groupedExecutionCapableScanNodes) {
    return new StageExecutionStrategy(ImmutableSet
            .copyOf(requireNonNull(groupedExecutionCapableScanNodes, "groupedExecutionScanNodes is null")));
}

From source file:com.arpnetworking.metrics.proxy.models.messages.LogsList.java

/**
 * Public constructor.
 *
 * @param logs Paths of logs
 */
public LogsList(final Set<Path> logs) {
    _logs = ImmutableSet.copyOf(logs);
}

From source file:io.prestosql.operator.StageExecutionDescriptor.java

@JsonCreator
public static StageExecutionDescriptor jsonCreator(
        @JsonProperty("groupedExecutionScanNodes") Set<PlanNodeId> groupedExecutionCapableScanNodes) {
    return new StageExecutionDescriptor(ImmutableSet
            .copyOf(requireNonNull(groupedExecutionCapableScanNodes, "groupedExecutionScanNodes is null")));
}

From source file:ch.ledcom.log4jtools.LoggerSetExtractor.java

public Set<String> getLoggers() {
    return ImmutableSet.copyOf(this.loggers);
}

From source file:de.xaniox.heavyspleef.persistence.DatabaseContext.java

public DatabaseContext(Set<T> accessors) {
    this.accessors = ImmutableSet.copyOf(accessors);
}