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

fun.mike.flapjack.pipeline.lab.HeaderBuilder Maven / Gradle / Ivy

There is a newer version: 0.0.15
Show newest version
package fun.mike.flapjack.pipeline.lab;

import java.util.stream.Collectors;

import fun.mike.flapjack.alpha.DelimitedFormat;

public class HeaderBuilder {
    public static String build(DelimitedFormat format) {
        String headerFrameDelimiter = format.isFramed() ? format.getFrameDelimiter().toString() : "";
        return format.getColumns().stream()
                .map(column -> headerFrameDelimiter + column.getId() + headerFrameDelimiter)
                .collect(Collectors.joining(format.getDelimiter().toString()));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy