com.etymon.pj.object
Class PjBoolean

java.lang.Object
  extended by com.etymon.pj.object.BaseObject
      extended by com.etymon.pj.object.PjObject
          extended by com.etymon.pj.object.PjBoolean
All Implemented Interfaces:
java.lang.Cloneable

public class PjBoolean
extends PjObject

A representation of the PDF Boolean type.


Field Summary
private  boolean _b
           
static PjBoolean FALSE
           
static PjBoolean TRUE
           
 
Constructor Summary
PjBoolean(boolean b)
          Creates a Boolean object.
 
Method Summary
 java.lang.Object clone()
          Returns a deep copy of this object.
 boolean equals(java.lang.Object obj)
          Compares two PjBoolean objects for equality.
 boolean getBoolean()
          Returns the Boolean value of this object.
 long writePdf(java.io.OutputStream os)
          Writes this Boolean to a stream in PDF format.
 
Methods inherited from class com.etymon.pj.object.PjObject
renumber
 
Methods inherited from class com.etymon.pj.object.BaseObject
toString, write, write, write, writeln
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRUE

public static final PjBoolean TRUE

FALSE

public static final PjBoolean FALSE

_b

private boolean _b
Constructor Detail

PjBoolean

public PjBoolean(boolean b)
Creates a Boolean object.

Parameters:
b - the Boolean value to initialize this object to.
Method Detail

getBoolean

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

Returns:
the Boolean value of this object.

writePdf

public long writePdf(java.io.OutputStream os)
              throws java.io.IOException
Writes this Boolean to a stream in PDF format.

Specified by:
writePdf in class BaseObject
Parameters:
os - the stream to write to.
Returns:
the number of bytes written.
Throws:
java.io.IOException - if an I/O error occurs.

clone

public java.lang.Object clone()
Returns a deep copy of this object.

Specified by:
clone in class BaseObject
Returns:
a deep copy of this object.

equals

public boolean equals(java.lang.Object obj)
Compares two PjBoolean objects for equality.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object to compare to.
Returns:
true if this object is the same as obj, false otherwise.