List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:de.muspellheim.datenverteiler.fuzzylib.LinguistischeVariable.java
public LinguistischeVariable(String name, List<LinguistischerTerm> terme) { this.name = name; this.terme = ImmutableList.copyOf(terme); }
From source file:org.apache.james.transport.mailets.remoteDelivery.Repeat.java
@SuppressWarnings("unchecked") public static <T> List<T> repeat(T element, int times) { Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive"); return ImmutableList.copyOf(Iterables.limit(Iterables.cycle(element), times)); }
From source file:io.prestosql.RowPagesBuilder.java
public static RowPagesBuilder rowPagesBuilder(boolean hashEnabled, List<Integer> hashChannels, Type... types) { return rowPagesBuilder(hashEnabled, hashChannels, ImmutableList.copyOf(types)); }
From source file:com.google.errorprone.refaster.UMethodInvocation.java
public static UMethodInvocation create(UExpression methodSelect, UExpression... arguments) { return create(methodSelect, ImmutableList.copyOf(arguments)); }
From source file:org.lanternpowered.server.script.transformer.SequentialTransformer.java
public static SequentialTransformer of(Iterable<Transformer> transformers) { return new SequentialTransformer(ImmutableList.copyOf(transformers)); }
From source file:com.facebook.presto.sql.gen.InvokeFunctionByteCodeExpression.java
public static ByteCodeExpression invokeFunction(Scope scope, CallSiteBinder callSiteBinder, String name, ScalarFunctionImplementation function, ByteCodeExpression... parameters) { return invokeFunction(scope, callSiteBinder, name, function, ImmutableList.copyOf(parameters)); }
From source file:com.google.devtools.build.lib.skyframe.RegisteredToolchainsValue.java
public static RegisteredToolchainsValue create(Iterable<DeclaredToolchainInfo> registeredToolchains) { return new AutoValue_RegisteredToolchainsValue(ImmutableList.copyOf(registeredToolchains)); }
From source file:org.jclouds.azurecompute.arm.domain.ResourceProviderMetaData.java
@SerializedNames({ "resourceType", "locations", "apiVersions" }) public static ResourceProviderMetaData create(final String resourceType, final List<String> locations, final List<String> apiVersions) { ResourceProviderMetaData.Builder builder = ResourceProviderMetaData.builder().resourceType(resourceType) .locations(locations == null ? ImmutableList.<String>of() : ImmutableList.copyOf(locations)) .apiVersions(apiVersions == null ? ImmutableList.<String>of() : ImmutableList.copyOf(apiVersions)); return builder.build(); }
From source file:org.lanternpowered.server.script.transformer.FirstSuccessTransformer.java
public static FirstSuccessTransformer of(Iterable<Transformer> transformers) { return new FirstSuccessTransformer(ImmutableList.copyOf(transformers)); }
From source file:com.moz.fiji.commons.monitoring.CompoundNotifier.java
/** * Create a new compound notifier with the provided notifiers. * * @param notifiers The notifiers./*from w w w. j a v a 2s .c om*/ * @return A new compound notifier. */ public static CompoundNotifier create(final Iterable<Notifier> notifiers) { return new CompoundNotifier(ImmutableList.copyOf(notifiers)); }