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

import lombok.RequiredArgsConstructor;
import lombok.Value;

@Value
@RequiredArgsConstructor
public class CellPosition implements Comparable<CellPosition> {

    int row;

    int col;


    @Override
    public int compareTo(CellPosition other) {

        int rowDiff = row - other.row;
        return rowDiff != 0 ? rowDiff : col - other.col;
    }

}