package com.knecon.fforesight.service.layoutparser.processor.docstrum.model;

import java.util.Comparator;
import java.util.List;

import com.knecon.fforesight.service.layoutparser.processor.utils.RectangleTransformations;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class Zone extends TextBoundingBox {

    private List<Line> lines;


    @SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
    public Zone(List<Line> lines) {

        this.lines = lines;
        setToBBoxOfComponents(lines);
    }


    public String toString() {

        StringBuilder sb = new StringBuilder();
        lines.forEach(line -> sb.append(line.toString()).append("\n"));
        return sb.toString().trim();
    }

}
