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.message.DismissCalendarItemAlarmRequest.java
public void setAlarms(Iterable<DismissAlarm> alarms) { this.alarms.clear(); if (alarms != null) { Iterables.addAll(this.alarms, alarms); }/* ww w . j a va 2s . c o m*/ }
From source file:org.jboss.hal.core.mbui.form.OperationFormBuilder.java
public OperationFormBuilder<T> exclude(Iterable<String> attributes) { Iterables.addAll(excludes, attributes); return this; }
From source file:eu.esdihumboldt.hale.ui.schema.presets.internal.SchemaPresetContentProvider.java
@Override public Object[] getElements(Object inputElement) { if (forceCategories) { return ArrayContentProvider.getInstance().getElements(inputElement); } else {/*ww w . j a va 2 s. c om*/ // only show categories for categories with more than one child List<Object> result = new ArrayList<>(); for (Object element : ArrayContentProvider.getInstance().getElements(inputElement)) { if (element instanceof SchemaCategory) { SchemaCategory cat = (SchemaCategory) element; if (SchemaCategoryExtension.DEFAULT_CATEGORY.equals(cat)) { // add all schemas w/o category Iterables.addAll(result, cat.getSchemas()); } else { int numSchemas = Iterables.size(cat.getSchemas()); if (numSchemas > 1) { // add category result.add(cat); } else if (numSchemas == 1) { // add schemas result.add(cat.getSchemas().iterator().next()); } } } else result.add(element); } return result.toArray(); } }
From source file:com.github.rinde.rinsim.central.GlobalStateObjectBuilder.java
public GlobalStateObjectBuilder addAvailableParcels(Iterable<? extends Parcel> ps) { Iterables.addAll(availableParcels, ps); return this; }
From source file:com.zimbra.soap.admin.message.RunUnitTestsRequest.java
public void setTests(Iterable<String> tests) { this.tests.clear(); if (tests != null) { Iterables.addAll(this.tests, tests); }/*ww w .j a v a2s .co m*/ }
From source file:org.eclipse.osee.orcs.script.dsl.ui.internal.DefaultOrcsObjectProvider.java
@Override public Iterable<? extends Identifiable<Long>> getAttributeTypes() { List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>(); for (IOrcsObjectProvider provider : getProviders()) { Iterables.addAll(toReturn, provider.getAttributeTypes()); }/*from ww w. j ava2 s. c om*/ return toReturn; }
From source file:org.jclouds.vcloud.domain.network.IpScope.java
public IpScope(boolean inherited, @Nullable String gateway, @Nullable String netmask, @Nullable String dns1, @Nullable String dns2, @Nullable String dnsSuffix, Iterable<IpRange> ipRanges, Iterable<String> allocatedIpAddresses) { this.inherited = inherited; this.gateway = gateway; this.netmask = netmask; this.dns1 = dns1; this.dns2 = dns2; this.dnsSuffix = dnsSuffix; Iterables.addAll(this.ipRanges, checkNotNull(ipRanges, "ipRanges")); Iterables.addAll(this.allocatedIpAddresses, checkNotNull(allocatedIpAddresses, "allocatedIpAddresses")); }
From source file:com.zimbra.soap.mail.message.GetCommentsResponse.java
public void setUsers(Iterable<IdEmailName> users) { this.users.clear(); if (users != null) { Iterables.addAll(this.users, users); }//ww w . j a va 2 s . c om }
From source file:com.complexible.common.base.ChangeList.java
/** * Add all the Changes to the current list of changes * * @param theChange the change to add/*from w ww . ja va 2 s. c o m*/ * * @return this ChangeList */ public ChangeList<E, T> appendAll(final Iterable<Change<E, T>> theChange) { Iterables.addAll(mChanges, theChange); return this; }
From source file:org.apache.metron.indexing.dao.MultiIndexDao.java
public MultiIndexDao(Iterable<IndexDao> composedDao) { this.indices = new ArrayList<>(); Iterables.addAll(indices, composedDao); }