package com.swiftcleaner.chovey.model.bean;

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

public class SimilarBean {
    private String url;
    private String hashCode;
    private int avgPixel;
    private long size;
    private boolean isSelect;
    private List<SimilarBean> items;

    // Constructor
    public SimilarBean(String url, String hashCode, int avgPixel, long size, boolean isSelect) {
        this.url = url;
        this.hashCode = hashCode;
        this.avgPixel = avgPixel;
        this.size = size;
        this.isSelect = isSelect;
        this.items = new ArrayList<>();
    }

    // Getters and Setters
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getHashCode() {
        return hashCode;
    }

    public void setHashCode(String hashCode) {
        this.hashCode = hashCode;
    }

    public int getAvgPixel() {
        return avgPixel;
    }

    public void setAvgPixel(int avgPixel) {
        this.avgPixel = avgPixel;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public List<SimilarBean> getItems() {
        return items;
    }

    public void setItems(List<SimilarBean> items) {
        this.items = items;
    }

    // Method to add a SimilarBean to the list
    public void addItem(SimilarBean item) {
        this.items.add(item);
    }

    // Override toString for easy debugging
    @Override
    public String toString() {
        return "SimilarBean{" +
                "url='" + url + '\'' +
                ", hashCode='" + hashCode + '\'' +
                ", avgPixel=" + avgPixel +
                ", size=" + size +
                ", isSelect=" + isSelect +
                ", items=" + items +
                '}';
    }
}