<commit_before>package stream.flarebot.flarebot.util.pagination;

import org.apache.commons.lang3.ArrayUtils;
import stream.flarebot.flarebot.util.MessageUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * Used for Building Paged Tables.
 */
public class PagedTableBuilder {

    private List<String> header;
    private List<List<String>> body;
    private int rows;
    private boolean pageCounts;

    public PagedTableBuilder() {
        body = new ArrayList<>();
        rows = 15;
        pageCounts = true;
        this.header = new ArrayList<>();
    }

    /**
     * Sets the column values
     *
     * @param columns A list of the column values to use for this table
     * @return this
     */
    public PagedTableBuilder setColumns(List<String> columns) {
        header = columns;
        return this;
    }

    /**
     * Adds a column the the table
     *
     * @param column The Column to add
     * @return this
     */
    public PagedTableBuilder addColumn(String column) {
        header.add(column);
        return this;
    }

    /**
     * Adds a row to the table.
     *
     * @param row A list of the role values to add
     * @return this
     */
    public PagedTableBuilder addRow(List<String> row) {
        body.add(row);
        return this;
    }

    /**
     * Sets the amount of rows per page.
     * This defaults to 15 rows per page.
     *
     * @param rows The amount of rows per page.
     * @return this.
     */
    public PagedTableBuilder setRowCount(int rows) {
        this.rows = rows;
        return this;
    }

    /**
     * Sets weather or not to show the page count in the table.
     * This is true by default.<commit_msg>Arrays!<commit_after>package stream.flarebot.flarebot.util.pagination;

import org.apache.commons.lang3.ArrayUtils;
import stream.flarebot.flarebot.util.MessageUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Used for Building Paged Tables.
 */
public class PagedTableBuilder {

    private List<String> header;
    private List<List<String>> body;
    private int rows;
    private boolean pageCounts;

    public PagedTableBuilder() {
        body = new ArrayList<>();
        rows = 15;
        pageCounts = true;
        this.header = new ArrayList<>();
    }

    /**
     * Sets the column values
     *
     * @param columns A list of the column values to use for this table
     * @return this
     */
    public PagedTableBuilder setColumns(List<String> columns) {
        header = columns;
        return this;
    }

    /**
     * Sets the column values
     *
     * @param columns An array of the column values to use for this table
     * @return this
     */
    public PagedTableBuilder setColums(String[] columns) {
        header = Arrays.asList(columns);
        return this;
    }

    /**
     * Adds a column the the table
     *
     * @param column The Column to add
     * @return this
     */
    public PagedTableBuilder addColumn(String column) {
        header.add(column);
        return this;
    }

    /**
     * Adds a row to the table.
     *
     * @param row A list of the role values to add
     * @return this
     */
    public PagedTableBuilder addRow(List<String> row) {
        body.add(row);
        return this;
    }

    /**
     * Adds a row to the table.
     *
     * @param row An array of the roles values to add
     * @return this
     */
    public PagedTableBuilder addRow(String[] row) {
        body.add(Arrays.asList(row));
        return this;
    }

    /**
     * Sets the amount of rows per page.
     * This defaults to 15 rows per page.
     *
     * @param rows The amount of rows per page.
     * @return this.
     */
    public PagedTableBuilder setRowCount(int rows) {
        this.rows = rows;
        return this;
    }

    /**
     * Sets weather or not to show the page count in the table.
     * This is true by default.
{'fraction_non_alphanumeric': 0.09317085554709317, 'fraction_numerical': 0.002538715410002539, 'mean_word_length': 2.059006211180124, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2500171', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1132, 'n_words': 381}