Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3576

Add getter methods to TextPosition

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.0.5, 3.0.0 PDFBox
    • None
    • None

    Description

      I've inherited code in my department that created a local copy of TextPosition and broke it's immutability. I'm trying to refactor this code and use the core Apache implementation and I understand the need for TextPosition to be immutable, but can getters be added to provide read-only access to the class's fields?

      We have custom code that does comparison of endX/endY values to determine if there are overlapping characters and other features. In our application, we also have a swap feature where we need to create/clone new TextPosition instances with minor differences between an existing TextPosition instance. Since there are a lot of fields that are required by the constructor of the new instances, but can't be read from an existing instance, we need a way to access these fields.

      There probably should also be an override for equals() and hashCode().

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tilman Tilman Hausherr
            kurt.devlin Kurt Devlin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment