package J20250804.demo01;

/**
 * @author WanJl
 * @version 1.0
 * @title FileStat
 * @description 封装文件统计信息（文件名、字符数、行数）
 * @create 2025/8/4
 */
public class FileStat {
    private String fileName;
    private Integer charCount;
    private Integer lineCount;

    public FileStat() {
    }

    public FileStat(String fileName, Integer charCount, Integer lineCount) {
        this.fileName = fileName;
        this.charCount = charCount;
        this.lineCount = lineCount;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getCharCount() {
        return charCount;
    }

    public void setCharCount(Integer charCount) {
        this.charCount = charCount;
    }

    public Integer getLineCount() {
        return lineCount;
    }

    public void setLineCount(Integer lineCount) {
        this.lineCount = lineCount;
    }

    @Override
    public String toString() {
        return String.format("%s：字符数=%d，行数=%d",fileName,charCount,lineCount);
    }

}
