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.jclouds.blobstore.domain.internal.PageSetImpl.java

public PageSetImpl(Iterable<? extends T> contents, @Nullable String nextMarker) {
    Iterables.addAll(this, contents);
    this.marker = nextMarker;
}

From source file:com.google.devtools.build.lib.analysis.PrerequisiteArtifacts.java

static PrerequisiteArtifacts get(RuleContext ruleContext, String attributeName, Mode mode) {
    Set<Artifact> result = new LinkedHashSet<>();
    for (FileProvider target : ruleContext.getPrerequisites(attributeName, mode, FileProvider.class)) {
        Iterables.addAll(result, target.getFilesToBuild());
    }/*from  w  ww.  j a v  a2 s .  c o  m*/
    return new PrerequisiteArtifacts(ruleContext, attributeName, ImmutableList.copyOf(result));
}

From source file:com.analog.lyric.benchmarking.utils.doublespace.ListIndexer.java

public ListIndexer(Iterable<Integer> indexes) {
    _indexes = new ArrayList<Integer>();
    Iterables.addAll(_indexes, indexes);
}

From source file:org.jclouds.atmosonline.saas.domain.internal.BoundedHashSet.java

public BoundedHashSet(Iterable<T> contents, String token) {
    Iterables.addAll(this, contents);
    this.token = token;
}

From source file:org.gradle.api.internal.artifacts.repositories.DefaultVersionList.java

protected void add(Iterable<String> versionStrings) {
    Iterables.addAll(versions, versionStrings);
}

From source file:io.prestosql.sql.parser.SqlParserOptions.java

public SqlParserOptions allowIdentifierSymbol(Iterable<IdentifierSymbol> identifierSymbols) {
    Iterables.addAll(allowedIdentifierSymbols, identifierSymbols);
    return this;
}

From source file:org.sosy_lab.cpachecker.core.algorithm.bmc.StaticCandidateProvider.java

public StaticCandidateProvider(Iterable<? extends CandidateInvariant> pCandidates) {
    Iterables.addAll(candidates, pCandidates);
}

From source file:org.eclipse.ziggurat.collect.collectors.AbstractCollector.java

public AbstractCollector(T startingElement, Iterable<? extends Picker<T>> pickers) {
    this.start = startingElement;
    this.pickers = Lists.newArrayList();
    Iterables.addAll(this.pickers, pickers);
}

From source file:com.google.devtools.build.lib.runtime.BlazeCommandUtils.java

public static ImmutableList<Class<? extends OptionsBase>> getStartupOptions(Iterable<BlazeModule> modules) {
    Set<Class<? extends OptionsBase>> options = new HashSet<>();
    options.addAll(DEFAULT_STARTUP_OPTIONS);
    for (BlazeModule blazeModule : modules) {
        Iterables.addAll(options, blazeModule.getStartupOptions());
    }// w  w w.  ja v  a2  s .  c  o m

    return ImmutableList.copyOf(options);
}

From source file:org.amanzi.awe.charts.model.impl.RangeAxisContainer.java

public RangeAxisContainer(String name, Iterable<String> cells) {
    if (StringUtils.isEmpty(name)) {
        LOGGER.error("name can't be null");
    }/*  w ww  . j a  v a  2s.  c o  m*/
    this.name = name;
    Iterables.addAll(this.cells, cells);

}