org.apache.pdfbox.persistence.util
Class COSObjectKey

java.lang.Object
  extended by 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 Summary
COSObjectKey(COSObject object)
          PDFObjectKey constructor comment.
COSObjectKey(long num, long gen)
          PDFObjectKey constructor comment.
 
Method Summary
 int compareTo(COSObjectKey other)
          
 boolean equals(Object obj)
          
 long getGeneration()
          This will get the generation number.
 long getNumber()
          This will get the objects id.
 int hashCode()
          
 void setGeneration(long newGeneration)
          This will set the objects generation number.
 void setNumber(long newNumber)
          This will set the objects id.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

COSObjectKey

public COSObjectKey(COSObject object)
PDFObjectKey constructor comment.

Parameters:
object - The object that this key will represent.

COSObjectKey

public COSObjectKey(long num,
                    long gen)
PDFObjectKey constructor comment.

Parameters:
num - The object number.
gen - The object generation number.
Method Detail

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>


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.