All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.blockwiseph.cftemplate.generator.sectionbuilder.AggregatingCFSectionBuilder Maven / Gradle / Ivy

package org.blockwiseph.cftemplate.generator.sectionbuilder;

import java.util.List;
import java.util.stream.Collectors;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;

@AllArgsConstructor(access = AccessLevel.PACKAGE)
class AggregatingCFSectionBuilder implements CFSectionBuilder {

    private final List subSectionBuilders;
    private final String spaceBetweenSections;

    @Override
    public String getSectionContents() {
        return subSectionBuilders.stream()
                .map(CFSectionBuilder::getSectionContents)
                .collect(Collectors.joining(spaceBetweenSections));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy