<commit_before>package org.crunchytorch.coddy.application.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Page<T> implements Serializable {

    private static final long serialVersionUID = -808950184664034440L;

    private long totalElement;

    private long totalPage;

    private List<T> hits;

    public Page() {
        // this blank constructor is needed by the library jackson
    }

    public Page(org.springframework.data.domain.Page<T> page) {
        this.totalElement = page.getTotalElements();
        this.totalPage = page.getTotalPages();
        this.hits = new ArrayList<>();
        page.forEach(hits::add);
    }

    public Page(long totalElement, long totalPage, List<T> hits) {
        this.totalElement = totalElement;
        this.totalPage = totalPage;<commit_msg>generic Type in page must extends serializable<commit_after>package org.crunchytorch.coddy.application.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Page<T extends Serializable> implements Serializable {

    private static final long serialVersionUID = -808950184664034440L;

    private long totalElement;

    private long totalPage;

    private List<T> hits;

    public Page() {
        // this blank constructor is needed by the library jackson
    }

    public Page(org.springframework.data.domain.Page<T> page) {
        this.totalElement = page.getTotalElements();
        this.totalPage = page.getTotalPages();
        this.hits = new ArrayList<>();
        page.forEach(hits::add);
    }

    public Page(long totalElement, long totalPage, List<T> hits) {
        this.totalElement = totalElement;
        this.totalPage = totalPage;
{'fraction_non_alphanumeric': 0.09382151029748284, 'fraction_numerical': 0.020594965675057208, 'mean_word_length': 3.2972972972972974, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3110023', 'n_tokens_mistral': 521, 'n_tokens_neox': 485, 'n_words': 129}