Package fr.becpg.repo.report.pdf
Record Class PdfTextEraser.Region
java.lang.Object
java.lang.Record
fr.becpg.repo.report.pdf.PdfTextEraser.Region
- Record Components:
minX- the left boundmaxX- the right boundyFromTop- the baseline, measured from the top of the pageyTolerance- the accepted distance to the baseline
- Enclosing class:
PdfTextEraser
static record PdfTextEraser.Region(float minX, float maxX, float yFromTop, float yTolerance)
extends Record
A text line segment, in the coordinates of the text stripper: horizontal bounds and the
baseline distance from the top of the page.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for themaxXrecord component.private final floatThe field for theminXrecord component.private static final floatprivate final floatThe field for theyFromToprecord component.private final floatThe field for theyTolerancerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRegion(float minX, float maxX, float yFromTop, float yTolerance) Creates an instance of aRegionrecord class. -
Method Summary
Modifier and TypeMethodDescription(package private) booleancontains(org.apache.pdfbox.text.TextPosition position) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatmaxX()Returns the value of themaxXrecord component.floatminX()Returns the value of theminXrecord component.final StringtoString()Returns a string representation of this record class.floatyFromTop()Returns the value of theyFromToprecord component.floatReturns the value of theyTolerancerecord component.
-
Field Details
-
minX
private final float minXThe field for theminXrecord component. -
maxX
private final float maxXThe field for themaxXrecord component. -
yFromTop
private final float yFromTopThe field for theyFromToprecord component. -
yTolerance
private final float yToleranceThe field for theyTolerancerecord component. -
X_TOLERANCE
private static final float X_TOLERANCE- See Also:
-
-
Constructor Details
-
Region
Region(float minX, float maxX, float yFromTop, float yTolerance) Creates an instance of aRegionrecord class.- Parameters:
minX- the value for theminXrecord componentmaxX- the value for themaxXrecord componentyFromTop- the value for theyFromToprecord componentyTolerance- the value for theyTolerancerecord component
-
-
Method Details
-
contains
boolean contains(org.apache.pdfbox.text.TextPosition position) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
minX
public float minX()Returns the value of theminXrecord component.- Returns:
- the value of the
minXrecord component
-
maxX
public float maxX()Returns the value of themaxXrecord component.- Returns:
- the value of the
maxXrecord component
-
yFromTop
public float yFromTop()Returns the value of theyFromToprecord component.- Returns:
- the value of the
yFromToprecord component
-
yTolerance
public float yTolerance()Returns the value of theyTolerancerecord component.- Returns:
- the value of the
yTolerancerecord component
-