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:com.google.template.soy.jbcsrc.restricted.ConstructorRef.java

/**
 * Returns a new {@link ConstructorRef} that refers to a constructor on the given type with the
 * given parameter types./*from  w w w  .  j a v  a 2  s .  c  om*/
 */
public static ConstructorRef create(TypeInfo type, Method init) {
    checkArgument(init.getName().equals("<init>") && init.getReturnType().equals(Type.VOID_TYPE),
            "'%s' is not a valid constructor", init);
    return new AutoValue_ConstructorRef(type, init, ImmutableList.copyOf(init.getArgumentTypes()));
}

From source file:com.icosilune.fn.ui.nodes.NodeFactoryImpl.java

public NodeFactoryImpl(NodeGraph nodeGraph, Iterable<? extends NodeFactoryImpl.NodeKey> nodeKeys) {
    this.nodeGraph = nodeGraph;
    this.nodeKeys = ImmutableList.copyOf(nodeKeys);
}

From source file:com.netflix.exhibitor.core.analyze.PathComplete.java

PathComplete(String path, int max, List<String> childIds) {
    this.path = path;
    this.max = max;
    this.childIds = ImmutableList.copyOf(childIds);
}

From source file:com.facebook.buck.core.toolchain.tool.impl.testutil.SimpleTool.java

public SimpleTool(String... prefix) {
    this.prefix = ImmutableList.copyOf(prefix);
}

From source file:org.eclipse.mylyn.internal.wikitext.commonmark.TextSegment.java

public TextSegment(Iterable<Line> lines) {
    this.lines = ImmutableList.copyOf(lines);
    text = computeText(this.lines);
}

From source file:co.cask.cdap.proto.SystemServiceLiveInfo.java

public SystemServiceLiveInfo(List<Containers.ContainerInfo> containers) {
    this.containers = ImmutableList.copyOf(containers);
}

From source file:org.eclipse.buildship.core.AggregateException.java

public AggregateException(Collection<? extends Throwable> causes) {
    Preconditions.checkNotNull(causes);//w ww .  jav  a  2s.c  o  m
    Preconditions.checkState(!causes.isEmpty());
    this.causes = ImmutableList.copyOf(causes);
}

From source file:com.facebook.buck.counters.CountersSnapshotEvent.java

public CountersSnapshotEvent(Iterable<CounterSnapshot> snapshots) {
    super(EventKey.unique());
    this.snapshots = ImmutableList.copyOf(snapshots);
}

From source file:org.gradle.configuration.project.PluginsProjectConfigureActions.java

public PluginsProjectConfigureActions(ClassLoader pluginsClassLoader) {
    actions = ImmutableList.copyOf(new ServiceLocator(pluginsClassLoader).getAll(ProjectConfigureAction.class));
}

From source file:com.facebook.presto.verifier.framework.QueryResult.java

public QueryResult(List<R> results, List<String> columnNames, QueryStats queryStats) {
    this.results = ImmutableList.copyOf(results);
    this.columnNames = requireNonNull(columnNames, "columnNames is null");
    this.queryStats = requireNonNull(queryStats, "queryStats is null");
}