Example usage for com.google.common.collect Iterables addAll

List of usage examples for com.google.common.collect Iterables addAll

Introduction

In this page you can find the example usage for com.google.common.collect Iterables addAll.

Prototype

public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd) 

Source Link

Document

Adds all elements in iterable to collection .

Usage

From source file:com.zimbra.soap.voice.type.VoiceMailPrefsFeature.java

public void setPrefs(Iterable<PrefInfo> prefs) {
    this.prefs.clear();
    if (prefs != null) {
        Iterables.addAll(this.prefs, prefs);
    }/*from w  w w .j a v  a 2 s  . c om*/
}

From source file:org.jclouds.vcloud.domain.network.FirewallService.java

public FirewallService(boolean enabled, Iterable<FirewallRule> firewallRules) {
    this.enabled = enabled;
    Iterables.addAll(this.firewallRules, checkNotNull(firewallRules, "firewallRules"));
}

From source file:com.google.devtools.build.skyframe.SequencedRecordingDifferencer.java

@Override
public void invalidate(Iterable<SkyKey> values) {
    Iterables.addAll(valuesToInvalidate, values);
}

From source file:com.zimbra.soap.voice.type.FeatureWithCallerList.java

public void setPhones(Iterable<CallerListEntry> phones) {
    this.phones.clear();
    if (phones != null) {
        Iterables.addAll(this.phones, phones);
    }//from  w  w w.j a va  2s .  com
}

From source file:com.zimbra.soap.jaxb.WrappedEnumElemList.java

public void setEntries(Iterable<ViewEnum> entries) {
    this.entries.clear();
    if (entries != null) {
        Iterables.addAll(this.entries, entries);
    }/*from  w w  w  .j a va  2 s . com*/
}

From source file:org.eclipse.osee.orcs.script.dsl.ui.internal.DefaultOrcsObjectProvider.java

@Override
public Iterable<? extends Identifiable<Long>> getBranches() {
    List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>();
    for (IOrcsObjectProvider provider : getProviders()) {
        Iterables.addAll(toReturn, provider.getBranches());
    }/*from w w  w.j  a v  a 2s .c o  m*/
    return toReturn;
}

From source file:forge.game.StaticEffects.java

public final void clearStaticEffects(final Set<Card> affectedCards) {
    ruleChanges.clear();/*w  ww.  jav  a2  s.  c  o m*/

    // remove all static effects
    for (final StaticEffect se : staticEffects.values()) {
        Iterables.addAll(affectedCards, se.remove());
    }
    this.staticEffects.clear();
}

From source file:com.zimbra.soap.voice.type.VoiceMailPrefsReq.java

public void setPrefs(Iterable<VoiceMailPrefName> prefs) {
    this.prefs.clear();
    if (prefs != null) {
        Iterables.addAll(this.prefs, prefs);
    }/*from   w w w.  j a va 2  s  .  c om*/
}

From source file:net.middell.combo.TextResourceCombo.java

/**
 * Constructor./*w  w  w  .j  a  va 2s .  c  o  m*/
 *
 * @param resources the resources to be contained in this combo. The iteration order of the parameter is
 *                  supposed to be significant.
 */
public TextResourceCombo(Iterable<TextResource> resources) {
    super(Iterables.size(resources));
    Iterables.addAll(this, resources);
}

From source file:org.jclouds.vcloud.domain.InstantiateVAppTemplateParams.java

public InstantiateVAppTemplateParams(String info, VirtualSystemSettingData virtualSystem,
        Iterable<ResourceAllocationSettingData> resourceAllocations) {
    this.info = info;
    this.virtualSystem = virtualSystem;
    Iterables.addAll(this.resourceAllocations, resourceAllocations);
}