Package org.apache.pdfbox.pdfparser.xref
Class AbstractXReference
java.lang.Object
org.apache.pdfbox.pdfparser.xref.AbstractXReference
- All Implemented Interfaces:
Comparable<XReferenceEntry>,XReferenceEntry
- Direct Known Subclasses:
FreeXReference,NormalXReference,ObjectStreamXReference
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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a crossreference stream entry of the givenXReferenceType. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(XReferenceEntry xReferenceEntry) Compares this object with the specified object for order.longReturns the value for the first column of the crossreference stream entry.getType()Returns theXReferenceTypeof this crossreference stream entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pdfbox.pdfparser.xref.XReferenceEntry
getReferencedKey, getSecondColumnValue, getThirdColumnValue
-
Field Details
-
type
-
-
Constructor Details
-
AbstractXReference
Creates a crossreference stream entry of the givenXReferenceType.- Parameters:
type- TheXReferenceTypeof the crossreference stream entry.
-
-
Method Details
-
getType
Returns theXReferenceTypeof this crossreference stream entry.- Specified by:
getTypein interfaceXReferenceEntry- Returns:
- The
XReferenceTypeof 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'sXReferenceType.)- Specified by:
getFirstColumnValuein interfaceXReferenceEntry- Returns:
- The value for the first column of the crossreference stream entry.
-
compareTo
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:
compareToin interfaceComparable<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.
-