List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:net.awairo.favdler.downloader.FromSpec.java
/** * ????????./*ww w . j av a2 s .co m*/ * * @param tweets * @return */ public static ImmutableList<FromSpec> copyOf(List<Tweet> tweets) { checkNotNull(tweets, "tweets"); checkArgument(!tweets.isEmpty()); return ImmutableList.copyOf(toFromSpecList(tweets)); }
From source file:com.axemblr.service.cm.models.commands.CommandList.java
@JsonCreator public CommandList(@JsonProperty("items") List<Command> items) { this.items = (items == null) ? ImmutableList.<Command>of() : ImmutableList.copyOf(items); }
From source file:org.jclouds.azurecompute.arm.domain.ServicePrincipal.java
@SerializedNames({ "appId", "deletionTimestamp", "displayName", "objectId", "objectType", "servicePrincipalNames" }) public static ServicePrincipal create(String appId, Date deletionTimestamp, String displayName, String objectId, String objectType, List<String> servicePrincipalNames) { List<String> servicePrincipals = servicePrincipalNames != null ? ImmutableList.copyOf(servicePrincipalNames) : ImmutableList.<String>of(); return builder().appId(appId).deletionTimestamp(deletionTimestamp).displayName(displayName) .objectId(objectId).objectType(objectType).servicePrincipalNames(servicePrincipals).build(); }
From source file:de.metas.ui.web.document.filter.DocumentFiltersList.java
public static DocumentFiltersList ofFilters(final DocumentFilter... filters) { if (filters == null || filters.length == 0) { return EMPTY; }// w w w . j ava2 s .c o m return ofFilters(ImmutableList.copyOf(filters)); }
From source file:org.opendaylight.controller.cluster.databroker.actors.dds.ClientTransactionCommitCohort.java
/** * @param clientTransaction */ ClientTransactionCommitCohort(final Collection<AbstractProxyTransaction> proxies) { this.proxies = ImmutableList.copyOf(proxies); }
From source file:org.jclouds.packet.domain.ProvisioningEvent.java
@SerializedNames({ "id", "type", "body", "created_at", "relationships", "interpolated", "href" }) public static ProvisioningEvent create(String id, String type, String body, Date createdAt, List<Href> relationships, String interpolated, String href) { return new AutoValue_ProvisioningEvent(id, type, body, createdAt, relationships == null ? ImmutableList.<Href>of() : ImmutableList.copyOf(relationships), interpolated, href);//from www.java2 s.co m }
From source file:org.opendaylight.controller.cluster.datastore.shardmanager.ShardManagerSnapshot.java
ShardManagerSnapshot(final @Nonnull List<String> shardList) { this.shardList = ImmutableList.copyOf(shardList); }
From source file:com.axemblr.service.cm.models.cm.ConfigList.java
@JsonCreator public ConfigList(@JsonProperty("items") List<Config> items) { this.items = (items == null) ? ImmutableList.<Config>of() : ImmutableList.copyOf(items); }
From source file:org.trancecode.TcAssert.java
public static <T> void assertIterableEquals(final Iterable<T> actual, final Iterable<T> expected) { Assert.assertEquals(ImmutableList.copyOf(actual), ImmutableList.copyOf(expected)); }
From source file:com.querydsl.collections.CollQueryFactory.java
/** * Create a new query/* www.j a v a 2s .c om*/ * * @param path source expression * @param arr source array * @return query */ public static <A> CollQuery<A> from(Path<A> path, A... arr) { return new CollQuery<Void>().from(path, ImmutableList.copyOf(arr)).select(path); }