Class COSObjectKey

  • All Implemented Interfaces:
    java.lang.Comparable<COSObjectKey>

    public class COSObjectKey
    extends java.lang.Object
    implements java.lang.Comparable<COSObjectKey>
    Object representing the physical reference to an indirect pdf object.
    • Field Detail

      • number

        private final long number
      • generation

        private int generation
    • Constructor Detail

      • COSObjectKey

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

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

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getGeneration

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

        public void fixGeneration​(int genNumber)
        This will set the generation number. It is intended for fixes only.
        Parameters:
        genNumber - the new 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 java.lang.Object
      • toString

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

        public int compareTo​(COSObjectKey other)
        Specified by:
        compareTo in interface java.lang.Comparable<COSObjectKey>