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

org.dflib.exp.agg.StringAggregators Maven / Gradle / Ivy

There is a newer version: 1.0.0-RC1
Show newest version
package org.dflib.exp.agg;

import org.dflib.Series;

import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @since 0.11
 */
public class StringAggregators {

    public static  Function, String> vConcat(String delimiter) {
        return CollectorAggregator.create(Collectors.joining(delimiter), String::valueOf);
    }

    public static  Function, String> vConcat(String delimiter, String prefix, String suffix) {
        return CollectorAggregator.create(Collectors.joining(delimiter, prefix, suffix), String::valueOf);
    }
}