public class PdfBoolean extends PdfObject
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
PdfBoolean(boolean b)
Constructs a Boolean object representing a Boolean value.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, filter, filterContents, toString
protected boolean _b
public static final PdfBoolean FALSE
PdfBoolean
object representing the Boolean
value false
.public static final PdfBoolean TRUE
PdfBoolean
object representing the Boolean
value true
.public PdfBoolean(boolean b)
valueOf(boolean)
method is preferred.b
- the Boolean value.public boolean equals(java.lang.Object obj)
PdfObject
public boolean getBoolean()
public int hashCode()
PdfObject
public static PdfBoolean valueOf(boolean b)
PdfBoolean
object with the specified
value. This method is normally preferable to PdfBoolean(boolean)
because it avoids
allocating a new instance.b
- the Boolean value.protected int writePdf(PdfWriter w, boolean spacing) throws java.io.IOException
PdfObject
writePdf
in class PdfObject
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.java.io.IOException