public class PdfInteger extends PdfNumber
Modifier and Type | Field and Description |
---|---|
protected int |
_n
The int value of this object.
|
static PdfInteger |
ZERO
A
PdfInteger object representing the int value
0 . |
Constructor and Description |
---|
PdfInteger(int n)
Constructs an integer object representing an int value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this instance with another PDF object for equality.
|
float |
getFloat()
Returns the float value of this number.
|
int |
getInt()
Returns the int value of this number.
|
long |
getLong()
Returns the long value of this number.
|
int |
hashCode()
Returns a hash code for this object.
|
protected int |
writePdf(PdfWriter w,
boolean spacing)
Writes this object in PDF format.
|
clone, filter, filterContents, toString
protected int _n
public static final PdfInteger ZERO
PdfInteger
object representing the int value
0
.public PdfInteger(int n)
n
- the int value.public boolean equals(java.lang.Object obj)
PdfObject
public int getInt()
PdfNumber
public long getLong()
PdfNumber
public float getFloat()
PdfNumber
public int hashCode()
PdfObject
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