List of usage examples for com.google.common.collect Iterables addAll
public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd)
From source file:com.zimbra.soap.mail.type.XParam.java
public static List<XParamInterface> toInterfaces(Iterable<XParam> params) { if (params == null) return null; List<XParamInterface> newList = Lists.newArrayList(); Iterables.addAll(newList, params); return newList; }
From source file:com.zimbra.soap.admin.message.GetAllUCProvidersResponse.java
public void setProviders(Iterable<VoiceProviderInfo> providers) { this.providers.clear(); if (providers == null) { this.providers = null; } else {//w ww. j a va2 s . com this.providers = Lists.newArrayList(); Iterables.addAll(this.providers, providers); } }
From source file:com.zimbra.soap.admin.message.GetXMbxSearchesListResponse.java
public void setSearchNodes(Iterable<SearchNode> searchNodes) { this.searchNodes.clear(); if (searchNodes != null) { Iterables.addAll(this.searchNodes, searchNodes); }/*from w w w .j a va 2 s.com*/ }
From source file:com.zimbra.soap.admin.message.BackupAccountQueryResponse.java
public void setAccounts(Iterable<BackupAccountQueryInfo> accounts) { this.accounts.clear(); if (accounts != null) { Iterables.addAll(this.accounts, accounts); }//from w ww. j ava 2 s . c om }
From source file:com.zimbra.soap.admin.message.QueryMailboxMoveResponse.java
public void setAccounts(Iterable<MailboxMoveInfo> accounts) { this.accounts.clear(); if (accounts != null) { Iterables.addAll(this.accounts, accounts); }// w ww.j ava 2 s. c o m }
From source file:com.zimbra.soap.admin.message.RemoteWipeResponse.java
public void setDevices(Iterable<DeviceStatusInfo> devices) { this.devices.clear(); if (devices != null) { Iterables.addAll(this.devices, devices); }/* w ww . j av a 2s . c om*/ }
From source file:com.zimbra.soap.admin.message.DeployZimletResponse.java
public void setProgresses(Iterable<ZimletDeploymentStatus> progresses) { this.progresses.clear(); if (progresses != null) { Iterables.addAll(this.progresses, progresses); }//from w w w . ja v a 2s .c o m }
From source file:fungus.JobQueue.java
public JobQueue extract(int n) { JobQueue ret = new JobQueue(); LinkedList<Job> temp = new LinkedList<Job>(); Iterables.addAll(temp, this); this.clear(); for (int i = 0; i < temp.size(); i++) { Job j = temp.get(i);/* ww w . j a v a2s . co m*/ if ((i < (n * 2.0)) && (i % 2 == 0)) ret.add(j); else add(j); } return ret; }
From source file:org.jclouds.s3.domain.BucketLogging.java
/** * /*from ww w . ja v a2 s . co m*/ * @param targetBucket * {@link #getTargetBucket} * @param targetPrefix * {@link #getTargetPrefix} * @param targetGrants * {@link #getTargetGrants} */ public BucketLogging(String targetBucket, String targetPrefix, Iterable<Grant> targetGrants) { this.targetBucket = targetBucket; this.targetPrefix = targetPrefix; Iterables.addAll(this.targetGrants, targetGrants); }
From source file:com.opengamma.util.fudgemsg.FudgeListWrapper.java
/** * Creates an instance. * * @param list the list, not null */ public FudgeListWrapper(Iterable<T> list) { Iterables.addAll(getList(), list); }