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

tech.tablesaw.reducing.CategoryReduceUtils Maven / Gradle / Ivy

package tech.tablesaw.reducing;

import tech.tablesaw.columns.Column;

/**
 *
 */
public interface CategoryReduceUtils extends Column, Iterable {

    int size();

    default String appendAll(String lineBreak) {
        StringBuilder builder = new StringBuilder();
        int count = 0;
        for (String next : this) {
            builder.append(next);
            if (count < size() - 1) {
                builder.append(lineBreak);
                count++;
            } else {
                break;
            }
        }

        return builder.toString();
    }

    default String appendAll() {
        return appendAll(" ");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy