Package org.apache.pdfbox.pdfparser.xref
Class AbstractXReference
- java.lang.Object
-
- org.apache.pdfbox.pdfparser.xref.AbstractXReference
-
- All Implemented Interfaces:
java.lang.Comparable<XReferenceEntry>,XReferenceEntry
- Direct Known Subclasses:
FreeXReference,NormalXReference,ObjectStreamXReference
public abstract class AbstractXReference extends java.lang.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 Summary
Fields Modifier and Type Field Description private XReferenceTypetype
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractXReference(XReferenceType type)Creates a crossreference stream entry of the givenXReferenceType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(XReferenceEntry xReferenceEntry)Compares this object with the specified object for order.longgetFirstColumnValue()Returns the value for the first column of the crossreference stream entry.XReferenceTypegetType()Returns theXReferenceTypeof this crossreference stream entry.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pdfbox.pdfparser.xref.XReferenceEntry
getReferencedKey, getSecondColumnValue, getThirdColumnValue
-
-
-
-
Field Detail
-
type
private final XReferenceType type
-
-
Constructor Detail
-
AbstractXReference
protected AbstractXReference(XReferenceType type)
Creates a crossreference stream entry of the givenXReferenceType.- Parameters:
type- TheXReferenceTypeof the crossreference stream entry.
-
-
Method Detail
-
getType
public XReferenceType 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
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:
compareToin interfacejava.lang.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.
-
-