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

    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.

Author:
  Christian Appl

### Constructor Summary

Constructors
`protected` `AbstractXReference(XReferenceType type)` Creates a crossreference stream entry of the given `XReferenceType`.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo(XReferenceEntry xReferenceEntry)` Compares this object with the specified object for order.
`long` `getFirstColumnValue()` Returns the value for the first column of the crossreference stream entry.
`XReferenceType` `getType()` Returns the `XReferenceType` of 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`

### Constructor Detail

#### AbstractXReference

    protected AbstractXReference(XReferenceType type)

Creates a crossreference stream entry of the given `XReferenceType`.

Parameters:
  `type` - The `XReferenceType` of the crossreference stream entry.

### Method Detail

#### 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.