List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:com.facebook.presto.execution.FailedQueryException.java
public FailedQueryException(Throwable... causes) { this(ImmutableList.copyOf(causes)); }
From source file:com.opengamma.web.analytics.AnalyticsColumnGroup.java
/** * @param name The name of the group//from w w w .j av a 2 s . c o m * @param columns The columns in the group */ /* package */ AnalyticsColumnGroup(String name, List<AnalyticsColumn> columns) { ArgumentChecker.notNull(name, "name"); ArgumentChecker.notNull(columns, "cols"); _name = name; _columns = ImmutableList.copyOf(columns); }
From source file:com.griddynamics.jagger.invoker.CircularSupplier.java
public static <T> CircularSupplier<T> create(T... instances) { return create(ImmutableList.copyOf(instances)); }
From source file:org.jclouds.s3.domain.ListMultipartUploadsResponse.java
public static ListMultipartUploadsResponse create(String bucket, @Nullable String keyMarker, @Nullable String uploadIdMarker, @Nullable String nextKeyMarker, @Nullable String nextUploadIdMarker, int maxUploads, boolean isTruncated, List<Upload> uploads) { uploads = ImmutableList.copyOf(uploads); return new AutoValue_ListMultipartUploadsResponse(bucket, keyMarker, uploadIdMarker, nextKeyMarker, nextUploadIdMarker, maxUploads, isTruncated, uploads); }
From source file:com.google.errorprone.refaster.UClassDecl.java
public static UClassDecl create(UMethodDecl... members) { return create(ImmutableList.copyOf(members)); }
From source file:com.google.devtools.build.lib.rules.python.PythonVersion.java
private static Iterable<String> convertToStrings(PythonVersion[] values) { return transform(ImmutableList.copyOf(values), Functions.toStringFunction()); }
From source file:cn.lambdalib.util.client.auxgui.AuxGuiHandler.java
public static List<AuxGui> active() { return ImmutableList.copyOf(auxGuiList); }
From source file:com.b2international.commons.validation.ConstraintViolations.java
/** * Formats the given set of {@link ConstraintViolation} to a list of * readable format.//from w w w. j av a 2 s . c o m * * @param violations * @return */ public static ImmutableList<String> format(Collection<? extends ConstraintViolation<?>> violations) { final Set<String> errors = Sets.newHashSet(); for (ConstraintViolation<?> v : violations) { errors.add(format(v)); } return ImmutableList.copyOf(Ordering.natural().sortedCopy(errors)); }
From source file:com.cdancy.etcd.rest.domain.keys.Node.java
@SerializedNames({ "createdIndex", "dir", "nodes", "expiration", "key", "modifiedIndex", "ttl", "value" }) public static Node create(int createdIndex, boolean dir, List<Node> nodes, String expiration, String key, int modifiedIndex, int ttl, String value) { return new AutoValue_Node(createdIndex, dir, nodes != null ? ImmutableList.copyOf(nodes) : ImmutableList.<Node>of(), expiration, key, modifiedIndex, ttl, value);// w w w . j av a2 s .c om }
From source file:com.google.errorprone.refaster.UMethodDecl.java
public static UMethodDecl create(UModifiers modifiers, CharSequence name, UExpression returnType, Iterable<UVariableDecl> parameters, Iterable<UExpression> thrown, UBlock body) { return new AutoValue_UMethodDecl(modifiers, StringName.of(name), returnType, ImmutableList.copyOf(parameters), ImmutableList.copyOf(thrown), body); }