PJX

com.etymon.pjx
Class PdfNull

java.lang.Object
  extended bycom.etymon.pjx.PdfObject
      extended bycom.etymon.pjx.PdfNull
All Implemented Interfaces:
java.lang.Cloneable

public class PdfNull
extends PdfObject

Represents the PDF null object.


Field Summary
static PdfNull NULL
          A PdfNull object representing the null value.
 
Constructor Summary
PdfNull()
          Constructs a null object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this instance with another PDF object for equality.
 int hashCode()
          Returns a hash code for this object.
static boolean isNull(java.lang.Object obj)
          Checks whether an object represents a null value.
static PdfNull valueOf()
          Returns a PdfNull object.
 
Methods inherited from class com.etymon.pjx.PdfObject
clone, filter, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final PdfNull NULL
A PdfNull object representing the null value.

Constructor Detail

PdfNull

public PdfNull()
Constructs a null object. In most cases there is no need to create a new instance of this class, and the valueOf() method is preferred.

Method Detail

isNull

public static boolean isNull(java.lang.Object obj)
Checks whether an object represents a null value. Note that this method differs slightly from equals(Object) in that this returns true when called with a null value. This method is useful for examining PDF objects, in which null and PdfNull should normally be considered equivalent. For example, if a dictionary value or an indirect object is PdfNull, it is equivalent to the object not existing.

Parameters:
obj - the object to examine.
Returns:
true if the object is either null or an instance of PdfNull; otherwise false is returned.

equals

public boolean equals(java.lang.Object obj)
Description copied from class: PdfObject
Compares this instance with another PDF object for equality.

Overrides:
equals in class PdfObject
Parameters:
obj - the object to compare this instance with.
Returns:
true if the PDF objects are equal.

hashCode

public int hashCode()
Description copied from class: PdfObject
Returns a hash code for this object.

Overrides:
hashCode in class PdfObject
Returns:
the hash code.

valueOf

public static PdfNull valueOf()
Returns a PdfNull object. This method is normally preferable to PdfNull() because it avoids allocating a new instance.

Returns:
the null object.

Copyright © 1998-2004 Etymon Systems, Inc.

The PDF data structures, operators, and specification are
Copyright © 1985-2004 Adobe Systems Incorporated.