org.icepdf.core.pobjects
Class Reference

java.lang.Object
  extended by org.icepdf.core.pobjects.Reference
All Implemented Interfaces:
java.io.Serializable

public class Reference
extends java.lang.Object
implements java.io.Serializable

The Reference class represents a PDF object reference number. A reference is made of two components:

Since:
1.0
See Also:
Serialized Form

Constructor Summary
Reference(int o, int g)
          Creates a new instance of a Reference.
Reference(java.lang.Number o, java.lang.Number g)
          Creates a new instance of a Reference.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other reference object is "equal to" this one.
 int getGenerationNumber()
          Gets the generation number represented by this reference.
 int getObjectNumber()
          Gets the object number represented by this reference.
 int hashCode()
          Creates a unique hash code for this reference object.
 java.lang.String toString()
          Gets a string summary of the reference objects number and generation number.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Reference

public Reference(java.lang.Number o,
                 java.lang.Number g)
Creates a new instance of a Reference.

Parameters:
o - object number
g - generation number

Reference

public Reference(int o,
                 int g)
Creates a new instance of a Reference.

Parameters:
o - object number
g - generation number
Method Detail

hashCode

public int hashCode()
Creates a unique hash code for this reference object.

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other reference object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - reference object to compare to this reference.
Returns:
tru,e if the two objects are equal; false, otherwise.

getObjectNumber

public int getObjectNumber()
Gets the object number represented by this reference.

Returns:
object number

getGenerationNumber

public int getGenerationNumber()
Gets the generation number represented by this reference.

Returns:
generation number

toString

public java.lang.String toString()
Gets a string summary of the reference objects number and generation number.

Overrides:
toString in class java.lang.Object
Returns:
summary of reference object data.