Record Class PdfTextEraser.Region

java.lang.Object
java.lang.Record
fr.becpg.repo.report.pdf.PdfTextEraser.Region
Record Components:
minX - the left bound
maxX - the right bound
yFromTop - the baseline, measured from the top of the page
yTolerance - 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

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The field for the maxX record component.
    private final float
    The field for the minX record component.
    private static final float
     
    private final float
    The field for the yFromTop record component.
    private final float
    The field for the yTolerance record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Region(float minX, float maxX, float yFromTop, float yTolerance)
    Creates an instance of a Region record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
    contains(org.apache.pdfbox.text.TextPosition position)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the maxX record component.
    float
    Returns the value of the minX record component.
    final String
    Returns a string representation of this record class.
    float
    Returns the value of the yFromTop record component.
    float
    Returns the value of the yTolerance record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • minX

      private final float minX
      The field for the minX record component.
    • maxX

      private final float maxX
      The field for the maxX record component.
    • yFromTop

      private final float yFromTop
      The field for the yFromTop record component.
    • yTolerance

      private final float yTolerance
      The field for the yTolerance record 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 a Region record class.
      Parameters:
      minX - the value for the minX record component
      maxX - the value for the maxX record component
      yFromTop - the value for the yFromTop record component
      yTolerance - the value for the yTolerance record component
  • Method Details

    • contains

      boolean contains(org.apache.pdfbox.text.TextPosition position)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • minX

      public float minX()
      Returns the value of the minX record component.
      Returns:
      the value of the minX record component
    • maxX

      public float maxX()
      Returns the value of the maxX record component.
      Returns:
      the value of the maxX record component
    • yFromTop

      public float yFromTop()
      Returns the value of the yFromTop record component.
      Returns:
      the value of the yFromTop record component
    • yTolerance

      public float yTolerance()
      Returns the value of the yTolerance record component.
      Returns:
      the value of the yTolerance record component