com.etymon.pjx
Class PdfBoolean

java.lang.Object
  extended by com.etymon.pjx.PdfObject
      extended by com.etymon.pjx.PdfBoolean
All Implemented Interfaces:
java.lang.Cloneable

public class PdfBoolean
extends PdfObject

Represents the PDF Boolean object.


Field Summary
protected  boolean _b
          The Boolean value of this object.
static PdfBoolean FALSE
          A PdfBoolean object representing the Boolean value false.
static PdfBoolean TRUE
          A PdfBoolean object representing the Boolean value true.
 
Constructor Summary
PdfBoolean(boolean b)
          Constructs a Boolean object representing a Boolean value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this instance with another PDF object for equality.
 boolean getBoolean()
          Returns the Boolean value of this object.
 int hashCode()
          Returns a hash code for this object.
static PdfBoolean valueOf(boolean b)
          Returns a PdfBoolean object with the specified value.
protected  int writePdf(PdfWriter w, boolean spacing)
          Writes this object in PDF format.
 
Methods inherited from class com.etymon.pjx.PdfObject
clone, filter, filterContents, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_b

protected boolean _b
The Boolean value of this object.


FALSE

public static final PdfBoolean FALSE
A PdfBoolean object representing the Boolean value false.


TRUE

public static final PdfBoolean TRUE
A PdfBoolean object representing the Boolean value true.

Constructor Detail

PdfBoolean

public PdfBoolean(boolean b)
Constructs a Boolean object representing a Boolean value. In most cases there is no need to create a new instance of this class, and the valueOf(boolean) method is preferred.

Parameters:
b - the Boolean value.
Method Detail

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.

getBoolean

public boolean getBoolean()
Returns the Boolean value of this object.

Returns:
the Boolean value.

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 PdfBoolean valueOf(boolean b)
Returns a PdfBoolean object with the specified value. This method is normally preferable to PdfBoolean(boolean) because it avoids allocating a new instance.

Parameters:
b - the Boolean value.
Returns:
the Boolean object.

writePdf

protected int writePdf(PdfWriter w,
                       boolean spacing)
                throws java.io.IOException
Description copied from class: PdfObject
Writes this object in PDF format.

Specified by:
writePdf in class PdfObject
Parameters:
w - the PdfWriter to write to.
spacing - specifies whether to add white-space before the object. A value of true enables the addition of white-space. If the object begins with a PDF delimiter, then this option is ignored and no white-space is written.
Returns:
the number of bytes written by this method.
Throws:
java.io.IOException