package com.qingyun.service.compare;


import com.github.difflib.patch.DeltaType;

import java.util.List;
import java.util.Objects;

/**
 * 变化位置信息类
 */
public class ChangeLocation {

    public List<String> sourceText;
    public List<String> targetText;
    public DeltaType changeType;
    public List<TextElement> sourceElements;
    public List<TextElement> targetElements;

    ChangeLocation(List<String> sourceText,
                   List<String> targetText,
                   DeltaType changeType,
                   List<TextElement> sourceElements,
                   List<TextElement> targetElements) {
        this.sourceText = sourceText;
        this.targetText = targetText;
        this.changeType = changeType;
        this.sourceElements = Objects.requireNonNull(sourceElements);
        this.targetElements = Objects.requireNonNull(targetElements);
    }
}
