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.admin.message.GetAllXMPPComponentsResponse.java

public void setComponents(Iterable<XMPPComponentInfo> components) {
    this.components.clear();
    if (components != null) {
        Iterables.addAll(this.components, components);
    }/*w ww  .  jav a 2 s. co m*/
}

From source file:com.clarkparsia.versioning.ui.ColorPool.java

private void refill() {
    Iterables.addAll(colors, DEFAULT_COLORS);
}

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

public void setNumbers(List<Integer> entries) {
    this.numbers.clear();
    if (entries != null) {
        Iterables.addAll(this.numbers, entries);
    }//from ww  w  .  j ava 2s  .c  o  m
}

From source file:org.objectweb.fractal.fscript.console.PrefixCompletor.java

private Collection<String> getCandidatesStartingWith(final String prefix) {
    Set<String> values = getAllPossibleValues();
    List<String> candidates = Lists.newArrayList();
    Iterables.addAll(candidates, Iterables.filter(values, new Predicate<String>() {
        public boolean apply(String name) {
            return name.startsWith(prefix);
        }// w  w  w. j a va2s  .  co  m
    }));
    return candidates;
}

From source file:com.zimbra.soap.mail.message.GetWatchingItemsResponse.java

public void setTargets(Iterable<WatchingTarget> targets) {
    this.targets.clear();
    if (targets != null) {
        Iterables.addAll(this.targets, targets);
    }/*from   ww w  .ja v a  2s  .  c  o m*/
}

From source file:com.zimbra.soap.mail.type.WkDay.java

public static List<WkDayInterface> toInterfaces(Iterable<WkDay> params) {
    if (params == null)
        return null;
    List<WkDayInterface> newList = Lists.newArrayList();
    Iterables.addAll(newList, params);
    return newList;
}

From source file:com.zimbra.soap.mail.message.CheckRecurConflictsResponse.java

public void setInstances(Iterable<ConflictRecurrenceInstance> instances) {
    this.instances.clear();
    if (instances != null) {
        Iterables.addAll(this.instances, instances);
    }/*  www. j a v  a2  s. com*/
}

From source file:com.zimbra.soap.admin.message.CheckBlobConsistencyResponse.java

public void setMailboxes(Iterable<MailboxBlobConsistency> mailboxes) {
    this.mailboxes.clear();
    if (mailboxes != null) {
        Iterables.addAll(this.mailboxes, mailboxes);
    }/*from  ww  w .ja va2  s  .c  o m*/
}

From source file:ec.demetra.xml.regression.TsModifierAdapters.java

public void load() {
    Iterable<TsModifierAdapter> all = ServiceLoader.load(TsModifierAdapter.class);
    Iterables.addAll(adapters, all);
}

From source file:com.zimbra.soap.mail.message.GetWatchersResponse.java

public void setWatchers(Iterable<WatcherInfo> watchers) {
    this.watchers.clear();
    if (watchers != null) {
        Iterables.addAll(this.watchers, watchers);
    }//from   w w w.  j a v a 2  s  .  com
}