package com.knecon.fforesight.service.layoutparser.processor.model.graph.nodes;

import java.util.stream.Stream;

import com.knecon.fforesight.service.layoutparser.processor.model.graph.textblock.TextBlock;
import com.knecon.fforesight.service.layoutparser.processor.model.graph.textblock.TextBlockCollector;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;

@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
public class DuplicatedParagraph extends Paragraph {

    TextBlock unsortedLeafTextBlock;


    @Override
    public TextBlock getTextBlock() {

        return Stream.of(leafTextBlock, unsortedLeafTextBlock).collect(new TextBlockCollector());

    }


    @Override
    public String toString() {

        return super.toString();
    }

}
