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:org.jclouds.ibm.smartcloud.domain.Volume.java
public Volume(String instanceId, int state, int size, String owner, Date createdTime, String location, Iterable<String> productCodes, String format, String name, String id) { this.instanceId = instanceId; this.state = state; this.size = size; this.owner = owner; this.createdTime = createdTime; this.location = location; Iterables.addAll(this.productCodes, productCodes); this.format = format; this.name = name; this.id = id; }
From source file:eu.esdihumboldt.hale.common.instance.io.impl.AbstractInstanceWriter.java
/** * Returns the target schema; override to return another set of schemas * /*from w ww . j a v a 2 s . co m*/ * @see InstanceWriter#getValidationSchemas() */ @Override public List<? extends Locatable> getValidationSchemas() { Preconditions.checkState(targetSchema != null); List<Locatable> result = new ArrayList<Locatable>(); Iterables.addAll(result, targetSchema.getSchemas()); return result; }
From source file:org.jclouds.vcloud.domain.network.internal.OrgNetworkImpl.java
public OrgNetworkImpl(String name, String type, URI id, @Nullable ReferenceType org, @Nullable String description, Iterable<Task> tasks, Configuration configuration, @Nullable ReferenceType networkPool, Iterable<String> allowedExternalIpAddresses) { super(name, type, id); this.org = org; this.description = description; Iterables.addAll(this.tasks, checkNotNull(tasks, "tasks")); this.configuration = checkNotNull(configuration, "configuration"); this.networkPool = networkPool; Iterables.addAll(this.allowedExternalIpAddresses, checkNotNull(allowedExternalIpAddresses, "allowedExternalIpAddresses")); }
From source file:org.jclouds.vcloud.domain.internal.VAppTemplateImpl.java
public VAppTemplateImpl(String name, String type, URI id, Status status, ReferenceType vdc, @Nullable String description, Iterable<Task> tasks, boolean ovfDescriptorUploaded, @Nullable String vAppScopedLocalId, Iterable<Vm> children, @Nullable VCloudNetworkSection networkSection) { super(name, type, id); this.status = checkNotNull(status, "status"); this.vdc = vdc;// TODO: once <1.0 is killed check not null this.description = description; Iterables.addAll(this.tasks, checkNotNull(tasks, "tasks")); this.vAppScopedLocalId = vAppScopedLocalId; this.ovfDescriptorUploaded = ovfDescriptorUploaded; Iterables.addAll(this.children, checkNotNull(children, "children")); this.networkSection = networkSection; // can be null when copying }
From source file:org.eclipse.osee.orcs.script.dsl.ui.internal.DefaultOrcsObjectProvider.java
@Override public Iterable<? extends Identifiable<Long>> getRelationTypes() { List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>(); for (IOrcsObjectProvider provider : getProviders()) { Iterables.addAll(toReturn, provider.getRelationTypes()); }/*ww w . jav a 2 s. c o m*/ return toReturn; }
From source file:com.zimbra.soap.mail.message.GetRecurResponse.java
public void setComponents(Iterable<CalendarItemRecur> components) { this.components.clear(); if (components != null) { Iterables.addAll(this.components, components); }/*from ww w . j a v a 2 s .co m*/ }
From source file:com.zimbra.soap.admin.message.SearchAutoProvDirectoryResponse.java
public void setEntries(Iterable<AutoProvDirectoryEntry> entries) { this.entries.clear(); if (entries != null) { Iterables.addAll(this.entries, entries); }//from w w w .j a va 2 s . c o m }
From source file:com.isotrol.impe3.pms.core.impl.ExportJobManagerImpl.java
/** * @see com.isotrol.impe3.pms.core.ExportJobManager#create(com.isotrol.impe3.pms.model.ExportJobType, * java.util.UUID, java.util.UUID, java.lang.Iterable) *//*from w w w . ja va2s . c om*/ public UUID create(ExportJobType type, UUID mainId, UUID otherId, Iterable<UUID> objects) throws PMSException { final ExportJobEntity entity = new ExportJobEntity(); entity.setType(type); entity.setMainId(mainId); entity.setOtherId(otherId); if (objects != null) { Iterables.addAll(entity.getObjects(), objects); } saveNew(entity); sync(); return entity.getId(); }
From source file:com.zimbra.soap.mail.type.FreeBusyUserInfo.java
public void setElements(Iterable<FreeBusySlot> elements) { this.elements.clear(); if (elements != null) { Iterables.addAll(this.elements, elements); }/*from www .j av a 2 s. co m*/ }
From source file:com.zimbra.soap.mail.type.MessageHitInfo.java
public void setMessagePartHits(Iterable<Part> messagePartHits) { this.messagePartHits.clear(); if (messagePartHits != null) { Iterables.addAll(this.messagePartHits, messagePartHits); }//ww w . jav a 2s . co m }