List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:org.eigenbase.util.CompositeList.java
/** * Creates a CompositeList.// w ww . j a v a 2 s . com * * @param lists Constituent lists * @param <T> Element type * @return List consisting of all lists */ public static <T> CompositeList<T> of(List<? extends T>... lists) { return new CompositeList<T>(ImmutableList.copyOf(lists)); }
From source file:io.prestosql.sql.tree.QualifiedName.java
public static QualifiedName of(Iterable<Identifier> originalParts) { requireNonNull(originalParts, "originalParts is null"); checkArgument(!isEmpty(originalParts), "originalParts is empty"); return new QualifiedName(ImmutableList.copyOf(originalParts)); }
From source file:com.google.errorprone.refaster.UNewClass.java
public static UNewClass create(List<? extends UExpression> typeArguments, UExpression identifier, UExpression... arguments) {/*from w w w.ja v a 2s .c o m*/ return create(null, typeArguments, identifier, ImmutableList.copyOf(arguments), null); }
From source file:com.google.errorprone.refaster.UBlock.java
static Choice<Unifier> unifyStatementList(Iterable<? extends UStatement> statements, Iterable<? extends StatementTree> targets, Unifier unifier) { Choice<UnifierWithUnconsumedStatements> choice = Choice .of(UnifierWithUnconsumedStatements.create(unifier, ImmutableList.copyOf(targets))); for (UStatement statement : statements) { choice = choice.thenChoose(statement); }//from w ww. j a v a2s . c o m return choice.thenOption(new Function<UnifierWithUnconsumedStatements, Optional<Unifier>>() { @Override public Optional<Unifier> apply(UnifierWithUnconsumedStatements state) { return state.unconsumedStatements().isEmpty() ? Optional.of(state.unifier()) : Optional.<Unifier>absent(); } }); }
From source file:com.google.javascript.jscomp.newtypes.QualifiedName.java
public static QualifiedName fromQualifiedString(String qname) { return qname.contains(".") ? new QualifiedName(ImmutableList.copyOf(Splitter.on('.').split(qname))) : new QualifiedName(qname); }
From source file:flipkart.mongo.replicator.core.model.Cluster.java
public Cluster(List<ReplicaSetConfig> replicaSets, List<Node> cfgsvrs) { this.replicaSets = ImmutableList.copyOf(replicaSets); this.cfgsvrs = ImmutableList.copyOf(cfgsvrs); }
From source file:com.facebook.swift.codec.metadata.MethodInjection.java
public MethodInjection(Method method, List<ParameterInjection> parameters) { this.method = method; this.parameters = ImmutableList.copyOf(parameters); }
From source file:org.onosproject.store.service.BatchWriteResult.java
public BatchWriteResult(List<WriteResult> writeResults) { this.writeResults = ImmutableList.copyOf(writeResults); }
From source file:org.apache.arrow.flight.FlightDescriptor.java
public static FlightDescriptor path(Iterable<String> path) { return new FlightDescriptor(false, ImmutableList.copyOf(path), null); }
From source file:com.facebook.presto.util.QueryExplanation.java
public QueryExplanation(List<Input> inputs) { this.inputs = ImmutableList.copyOf(requireNonNull(inputs, "inputs is null")); }