class FreeXReference extends AbstractXReference
{

    public static final FreeXReference NULL_ENTRY = //
            new FreeXReference(new COSObjectKey(0, 65535), 0);
    private final COSObjectKey key;
    private final long nextFreeObject;

    /**
     * Sets the given {@link COSObjectKey} as a free reference in a PDF's crossreference stream ({@link PDFXRefStream}).
     *
     * @param key The key, that shall be set as the free reference of the document.
     * @param nextFreeObject The object number of the next free object.
     */
    public FreeXReference(COSObjectKey key, long nextFreeObject)
    {
        super(XReferenceType.FREE);
        this.key = key;
        this.nextFreeObject = nextFreeObject;
    }

    /**
     * Returns the {@link COSObjectKey} of the object, that is described by this crossreference stream entry.
     *
     * @return The {@link COSObjectKey} of the object, that is described by this crossreference stream entry.
     */
    @Override
    public COSObjectKey getReferencedKey()
    {
        return key;
    }

    /**
     * Returns the value for the second column of the crossreference stream entry. (This is the object number of the set
     * next free {@link COSObjectKey} - for entries of this type.)
     *
     * @return The value for the second column of the crossreference stream entry.
     */
    @Override
    public long getSecondColumnValue()
    {
        return nextFreeObject;
    }

    /**
     * Returns the value for the third column of the crossreference stream entry. (This is the generation number of the
     * set next free {@link COSObjectKey} - for entries of this type.)
     *
     * @return The value for the third column of the crossreference stream entry.
     */
    @Override
    public long getThirdColumnValue()
    {
        return getReferencedKey().getGeneration();
    }

    /**
     * Returns a string representation of this crossreference stream entry.
     *
     * @return A string representation of this crossreference stream entry.
     */
    @Override
    public String toString()
    {<FILL_FUNCTION_BODY>}
}

        return "FreeReference{" + "key=" + key + ", nextFreeObject=" + nextFreeObject + ", type="
                + getType().getNumericValue() + " }";
    
<methods>public int compareTo(org.apache.pdfbox.pdfparser.xref.XReferenceEntry) ,public long getFirstColumnValue() ,public org.apache.pdfbox.pdfparser.xref.XReferenceType getType() <variables>private final non-sealed org.apache.pdfbox.pdfparser.xref.XReferenceType type