List of usage examples for com.google.common.collect ImmutableSet copyOf
public static <E> ImmutableSet<E> copyOf(Iterator<? extends E> elements)
From source file:software.betamax.ComposedMatchRule.java
public static MatchRule of(Iterable<MatchRule> rules) { return new ComposedMatchRule(ImmutableSet.copyOf(rules)); }
From source file:org.gradle.api.internal.tasks.compile.incremental.deps.DependentsSet.java
public static DependentsSet dependents(String... dependentClasses) { if (dependentClasses.length == 0) { return empty(); } else {// w ww. jav a 2s . com return new DefaultDependentsSet(ImmutableSet.copyOf(dependentClasses)); } }
From source file:com.google.caliper.bridge.DryRunSuccessLogMessage.java
/** Creates a new dry-run success log message for the given experiment IDs. */ public static DryRunSuccessLogMessage create(Iterable<Integer> ids) { return new AutoValue_DryRunSuccessLogMessage(ImmutableSet.copyOf(ids)); }
From source file:pw.swordfish.validation.Violations.java
public static <T> Violations<T> of(Iterable<ConstraintViolation<T>> violations) { return of(ImmutableSet.copyOf(violations)); }
From source file:com.google.template.soy.jssrc.dsl.Leaf.java
static WithValue create(String text, Iterable<GoogRequire> require) { return create(new JsExpr(text, Integer.MAX_VALUE), ImmutableSet.copyOf(require)); }
From source file:com.google.gerrit.server.query.change.QueryOptions.java
public static QueryOptions create(IndexConfig config, int start, int limit, Set<String> fields) { checkArgument(start >= 0, "start must be nonnegative: %s", start); checkArgument(limit > 0, "limit must be positive: %s", limit); return new AutoValue_QueryOptions(config, start, limit, ImmutableSet.copyOf(fields)); }
From source file:com.google.template.soy.jssrc.dsl.LeafStatement.java
static LeafStatement create(String value, Iterable<GoogRequire> requires) { return new AutoValue_LeafStatement(value, ImmutableSet.copyOf(requires)); }
From source file:org.onosproject.store.cluster.impl.ClusterDefinition.java
/** * Creates a new cluster definition.// www.j a v a2s .c om * @param nodes cluster nodes information * @param ipPrefix ip prefix common to all cluster nodes * @return cluster definition */ public static ClusterDefinition from(Set<NodeInfo> nodes, String ipPrefix) { ClusterDefinition definition = new ClusterDefinition(); definition.ipPrefix = ipPrefix; definition.nodes = ImmutableSet.copyOf(nodes); return definition; }
From source file:com.google.errorprone.bugpatterns.threadsafety.ImmutableAnnotationInfo.java
public static ImmutableAnnotationInfo create(String typeName, Iterable<String> containerOf) { return new AutoValue_ImmutableAnnotationInfo(typeName, ImmutableSet.copyOf(containerOf)); }
From source file:com.facebook.presto.sql.planner.DependencyExtractor.java
public static Set<Symbol> extractUnique(Expression expression) { return ImmutableSet.copyOf(extractAll(expression)); }