From 2e37cd5669a95c0fd55c563f5fe680a3c8d9030b Mon Sep 17 00:00:00 2001 From: Thomas Beyer Date: Fri, 28 Apr 2023 12:32:11 +0200 Subject: [PATCH] RED-6619 - reformat code --- .../redaction/v1/server/tableextraction/model/Cell.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Cell.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Cell.java index bf286a67..a4e755fb 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Cell.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/tableextraction/model/Cell.java @@ -27,7 +27,9 @@ public class Cell extends Rectangle { private static final int MIN_SIZE = 1; + public Cell(Point2D topLeft, Point2D bottomRight) { + super((float) topLeft.getY(), (float) topLeft.getX(), (float) (bottomRight.getX() - topLeft.getX()), (float) (bottomRight.getY() - topLeft.getY())); } @@ -66,8 +68,10 @@ public class Cell extends Rectangle { return TextNormalizationUtilities.removeHyphenLineBreaks(sb.toString()).replaceAll("\n", " ").replaceAll(" {2}", " "); } + public boolean hasMinimumSize() { return this.getHeight() >= MIN_SIZE && this.getWidth() >= MIN_SIZE; } + }