Class COSObjectKey

java.lang.Object
org.apache.pdfbox.persistence.util.COSObjectKey
All Implemented Interfaces:
Comparable<COSObjectKey>

public class COSObjectKey extends Object implements Comparable<COSObjectKey>
Object representing the physical reference to an indirect pdf object.
Version:
$Revision: 1.5 $
Author:
Michael Traut
  • Constructor Details

    • COSObjectKey

      public COSObjectKey(COSObject object)
      Constructor.
      Parameters:
      object - The object that this key will represent.
    • COSObjectKey

      public COSObjectKey(long num, long gen)
      Constructor.
      Parameters:
      num - The object number.
      gen - The object generation number.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getGeneration

      public long getGeneration()
      This will get the generation number.
      Returns:
      The objects generation number.
    • getNumber

      public long getNumber()
      This will get the objects id.
      Returns:
      The object's id.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setGeneration

      public void setGeneration(long newGeneration)
      This will set the objects generation number.
      Parameters:
      newGeneration - The objects generation number.
    • setNumber

      public void setNumber(long newNumber)
      This will set the objects id.
      Parameters:
      newNumber - The objects number.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(COSObjectKey other)
      Specified by:
      compareTo in interface Comparable<COSObjectKey>