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

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

Introduction

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

Prototype

public static <E> ImmutableList<E> copyOf(E[] elements) 

Source Link

Usage

From source file:io.prestosql.plugin.mysql.MySqlQueryRunner.java

public static QueryRunner createMySqlQueryRunner(TestingMySqlServer server, TpchTable<?>... tables)
        throws Exception {
    return createMySqlQueryRunner(server, ImmutableList.copyOf(tables));
}

From source file:com.cdancy.etcd.rest.domain.members.CreateMember.java

@SerializedNames({ "name", "peerURLs", "clientURLs" })
public static CreateMember create(String name, List<String> peerURLs, List<String> clientURLs) {
    if (clientURLs == null) {
        clientURLs = ImmutableList.of();
    }//  w  ww .  j  av a2  s  . co m
    return new AutoValue_CreateMember(name, ImmutableList.copyOf(peerURLs), ImmutableList.copyOf(clientURLs));
}

From source file:com.spotify.asyncdatastoreclient.QueryResult.java

static QueryResult build(final DatastoreV1.LookupResponse response) {
    return new QueryResult(ImmutableList.copyOf(response.getFoundList().stream()
            .map(entity -> Entity.builder(entity.getEntity()).build()).collect(Collectors.toList())));
}

From source file:com.google.errorprone.refaster.UMemberReference.java

public static UMemberReference create(ReferenceMode mode, UExpression qualifierExpression, CharSequence name,
        @Nullable Iterable<? extends UExpression> typeArguments) {
    return new AutoValue_UMemberReference(mode, qualifierExpression, StringName.of(name),
            (typeArguments == null) ? null : ImmutableList.copyOf(typeArguments));
}

From source file:io.airlift.configuration.Configuration.java

public static List<Message> processConfiguration(ConfigurationFactory configurationFactory,
        WarningsMonitor warningsMonitor, Module... modules) {
    return processConfiguration(configurationFactory, warningsMonitor, ImmutableList.copyOf(modules));
}

From source file:com.google.devtools.build.lib.rules.java.JavaSourceJarsProvider.java

public static JavaSourceJarsProvider create(NestedSet<Artifact> transitiveSourceJars,
        Iterable<Artifact> sourceJars) {
    return new AutoValue_JavaSourceJarsProvider(transitiveSourceJars, ImmutableList.copyOf(sourceJars));
}

From source file:de.flapdoodle.apache.pivot.containers.Containers.java

public static ImmutableList<Component> componentsAsList(Container container) {
    return ImmutableList.copyOf(components(container));
}

From source file:com.google.errorprone.refaster.UBlock.java

public static UBlock create(UStatement... statements) {
    return create(ImmutableList.copyOf(statements));
}

From source file:com.google.idea.blaze.base.lang.buildfile.language.semantics.AttributeDefinition.java

@Nullable
private static ImmutableList<String> getAllowedRuleClasses(Build.AttributeDefinition attr) {
    if (!attr.hasAllowedRuleClasses()) {
        return null;
    }/*from ww  w.  ja v a2 s .  co  m*/
    return ImmutableList.copyOf(attr.getAllowedRuleClasses().getAllowedRuleClassList());
}

From source file:com.facebook.presto.execution.scheduler.NetworkLocation.java

public static NetworkLocation create(List<String> segments) {
    requireNonNull(segments, "segments is null");
    return new NetworkLocation(ImmutableList.copyOf(segments));
}