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:org.yakindu.sct.model.stext.scoping.TypeSystemAwareScope.java

@Override
protected Iterable<IEObjectDescription> getAllLocalElements() {
    List<IEObjectDescription> result = Lists.newArrayList();
    Iterable<IEObjectDescription> iterable = Scopes.scopedElementsFor(
            EcoreUtil2.<EObject>getObjectsByType(typeSystem.getConcreteTypes(), eClass), qualifiedNameProvider);
    Iterables.addAll(result, iterable);
    return result;
}

From source file:com.zimbra.soap.account.message.ModifyZimletPrefsResponse.java

public void setZimlets(Iterable<String> zimlets) {
    this.zimlets.clear();
    if (zimlets != null) {
        Iterables.addAll(this.zimlets, zimlets);
    }// w  w  w.ja  v  a 2s  .c  o  m
}

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

public void setProviders(Iterable<FreeBusyQueueProvider> providers) {
    this.providers.clear();
    if (providers != null) {
        Iterables.addAll(this.providers, providers);
    }/*from w w  w  .  jav a  2s  .c  om*/
}

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

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

From source file:io.druid.indexer.granularity.UniformGranularitySpec.java

@JsonCreator
public UniformGranularitySpec(@JsonProperty("gran") Granularity granularity,
        @JsonProperty("intervals") List<Interval> inputIntervals) {
    List<Interval> granularIntervals = Lists.newArrayList();

    for (Interval inputInterval : inputIntervals) {
        Iterables.addAll(granularIntervals, granularity.getIterable(inputInterval));
    }/*  w ww.  ja v  a2  s  .c o m*/

    this.granularity = granularity;
    this.inputIntervals = ImmutableList.copyOf(inputIntervals);
    this.wrappedSpec = new ArbitraryGranularitySpec(granularIntervals);
}

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

public void setSearchFolders(Iterable<SearchFolder> searchFolders) {
    this.searchFolders.clear();
    if (searchFolders != null) {
        Iterables.addAll(this.searchFolders, searchFolders);
    }/*from  w w  w.  j  a  va2s  .  c o m*/
}

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

public void setProviders(Iterable<FreeBusyProviderInfo> providers) {
    this.providers.clear();
    if (providers != null) {
        Iterables.addAll(this.providers, providers);
    }/*www  .j ava 2 s. co  m*/
}

From source file:org.jboss.hal.core.mbui.form.OperationFormBuilder.java

public OperationFormBuilder<T> include(Iterable<String> attributes) {
    //noinspection ResultOfMethodCallIgnored
    Iterables.addAll(includes, attributes);
    return this;
}

From source file:org.jclouds.s3.domain.internal.ListBucketResponseImpl.java

public ListBucketResponseImpl(String name, Iterable<ObjectMetadata> contents, String prefix, String marker,
        String nextMarker, int maxKeys, String delimiter, boolean isTruncated, Set<String> commonPrefixes) {
    Iterables.addAll(this, contents);
    this.name = name;
    this.prefix = prefix;
    this.marker = marker;
    this.nextMarker = nextMarker;
    this.maxKeys = maxKeys;
    this.truncated = isTruncated;
    this.delimiter = delimiter;
    this.commonPrefixes = commonPrefixes;
}

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

public void setDataSources(Iterable<DataSourceInfo> dataSources) {
    this.dataSources.clear();
    if (dataSources != null) {
        Iterables.addAll(this.dataSources, dataSources);
    }//ww w.  j a  va 2 s. c  om
}