Class AbstractXReference

java.lang.Object
org.apache.pdfbox.pdfparser.xref.AbstractXReference
All Implemented Interfaces:
Comparable<XReferenceEntry>, XReferenceEntry
Direct Known Subclasses:
FreeXReference, NormalXReference, ObjectStreamXReference

public abstract class AbstractXReference extends Object implements XReferenceEntry
An extending class represents an entry, as it can be found in a PDF's crossreference stream (PDFXRefStream). Such an entry shall locate a PDF object/resource in a PDF document.
  • Field Details

  • Constructor Details

    • AbstractXReference

      protected AbstractXReference(XReferenceType type)
      Creates a crossreference stream entry of the given XReferenceType.
      Parameters:
      type - The XReferenceType of the crossreference stream entry.
  • Method Details

    • getType

      public XReferenceType getType()
      Returns the XReferenceType of this crossreference stream entry.
      Specified by:
      getType in interface XReferenceEntry
      Returns:
      The XReferenceType of this crossreference stream entry.
    • getFirstColumnValue

      public long getFirstColumnValue()
      Returns the value for the first column of the crossreference stream entry. (The numeric representation of this entry's (The numeric representation of this entry's XReferenceType.)
      Specified by:
      getFirstColumnValue in interface XReferenceEntry
      Returns:
      The value for the first column of the crossreference stream entry.
    • compareTo

      public int compareTo(XReferenceEntry xReferenceEntry)
      Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      Specified by:
      compareTo in interface Comparable<XReferenceEntry>
      Parameters:
      xReferenceEntry - the object to be compared.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.