class XrefEntry
{
    private final int index;
    private final COSObjectKey key;
    private final long offset;
    private final COSObject cosObject;
    
    public XrefEntry(int index, COSObjectKey key, long offset, COSObject cosObject)
    {
        this.index = index;
        this.key = key;
        this.offset = offset;
        this.cosObject = cosObject;
    }
    
    public COSObjectKey getKey()
    {
        return key;
    }

    public int getIndex()
    {
        return index;
    }

    public COSObject getCOSObject()
    {
        return cosObject;
    }

    public COSBase getObject()
    {
        return cosObject != null ? cosObject.getObject() : null;
    }

    public String getPath()
    {
        return XrefEntries.PATH + "/" + toString();
    }

    @Override
    public String toString()
    {<FILL_FUNCTION_BODY>}
}

        if (key == null)
        {
            return "(null)";
        }
        return offset >= 0 ? //
                "Offset: " + offset + " [" + key + "]" : //
                "Compressed object stream: " + (-offset) + " [" + key + "]";
    
<no_super_class>