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:org.jboss.weld.bootstrap.SpecializedBeanResolver.java
private <T extends Bean<?>> Set<T> getSpecializedBeans(T bean, BootstrapTransform<T> transform) { Set<T> beans = new HashSet<T>(); for (BeanDeployerEnvironment environment : accessibleEnvironments) { Iterables.addAll(beans, transform.transform(bean, environment)); }/*from w w w. ja v a2 s. c o m*/ return beans; }
From source file:com.zimbra.soap.admin.type.InfoForSessionType.java
public void setAccounts(Iterable<AccountSessionInfo> accounts) { this.accounts.clear(); if (accounts != null) { Iterables.addAll(this.accounts, accounts); }//from w w w .j av a 2 s . c o m }
From source file:dagger.internal.codegen.writer.ClassWriter.java
public void addTypeParameters(Iterable<TypeVariableName> typeVariableNames) { Iterables.addAll(typeParameters, typeVariableNames); }
From source file:com.zimbra.soap.mail.message.SetAppointmentResponse.java
public void setExceptions(Iterable<ExceptIdInfo> exceptions) { this.exceptions.clear(); if (exceptions != null) { Iterables.addAll(this.exceptions, exceptions); }/*from www . j a v a2 s . c om*/ }
From source file:org.summer.dsl.xbase.scoping.batch.StaticFeatureScope.java
@Override protected Collection<IEObjectDescription> getLocalElementsByName(QualifiedName name) { final Set<JvmFeature> allFeatures = Sets.newLinkedHashSet(); processFeatureNames(name, new NameAcceptor() { public void accept(String simpleName, int order) { for (JvmType type : bucket.getTypes()) { if (type instanceof JvmDeclaredType) { Iterable<JvmFeature> features = findAllFeaturesByName(type, simpleName, bucket.getResolvedFeaturesProvider()); Iterable<? extends JvmFeature> filtered = order == 1 ? features : filter(features, JvmOperation.class); Iterables.addAll(allFeatures, filtered); }/* w w w . j av a 2 s . com*/ } } }); if (allFeatures.isEmpty()) return Collections.emptyList(); List<IEObjectDescription> allDescriptions = Lists.newArrayListWithCapacity(allFeatures.size()); for (JvmFeature feature : allFeatures) { if (feature.isStatic()) allDescriptions.add(createDescription(name, feature, bucket)); else if (receiver == null && receiverType == null) { allDescriptions.add(createInstanceDescription(name, feature, bucket)); } } return allDescriptions; }
From source file:com.zimbra.soap.mail.type.RetentionPolicy.java
public RetentionPolicy(Iterable<Policy> keep, Iterable<Policy> purge) { this.keep.clear(); this.purge.clear(); if (keep != null) { Iterables.addAll(this.keep, keep); }/*from w ww .j a va 2s. co m*/ if (purge != null) { Iterables.addAll(this.purge, purge); } }
From source file:jflowmap.FlowMapAttrSpec.java
private ArrayList<String> flowAttrs() { ArrayList<String> attrs = Lists.newArrayList(flowSrcNodeAttr, flowTargetNodeAttr); Iterables.addAll(attrs, flowWeightAttrs); return attrs; }
From source file:org.gradle.api.reporting.components.ComponentReport.java
@TaskAction public void report() { Project project = getProject();/*from www.java 2 s .co m*/ StyledTextOutput textOutput = getTextOutputFactory().create(ComponentReport.class); ComponentReportRenderer renderer = new ComponentReportRenderer(getFileResolver(), getBinaryRenderer()); renderer.setOutput(textOutput); renderer.startProject(project); Collection<ComponentSpec> components = new ArrayList<ComponentSpec>(); ComponentSpecContainer componentSpecs = getModelRegistry().find(ModelPath.path("components"), ModelType.of(ComponentSpecContainer.class)); if (componentSpecs != null) { Iterables.addAll(components, componentSpecs); } TestSuiteContainer testSuites = getModelRegistry().find(ModelPath.path("testSuites"), ModelType.of(TestSuiteContainer.class)); if (testSuites != null) { Iterables.addAll(components, testSuites); } renderer.renderComponents(components); ProjectSourceSet sourceSets = getModelRegistry().find(ModelPath.path("sources"), ModelType.of(ProjectSourceSet.class)); if (sourceSets != null) { renderer.renderSourceSets(sourceSets); } BinaryContainer binaries = getModelRegistry().find(ModelPath.path("binaries"), ModelType.of(BinaryContainer.class)); if (binaries != null) { renderer.renderBinaries(binaries); } renderer.completeProject(project); renderer.complete(); }
From source file:co.cask.cdap.internal.app.worker.DefaultWorkerConfigurer.java
@Override public void useDatasets(Iterable<String> datasets) { Iterables.addAll(this.datasets, datasets); }
From source file:com.zimbra.soap.mail.message.GetDataSourcesResponse.java
public void setDataSources(Iterable<DataSource> dataSources) { this.dataSources.clear(); if (dataSources != null) { Iterables.addAll(this.dataSources, dataSources); }//w w w . j av a 2 s. c o m }