public class PdfNumber extends PdfObject
PdfNumber
provides two types of numbers, integer and real.
Integers may be specified by signed or unsigned constants. Reals may only be
in decimal format.
This object is described in the 'Portable Document Format Reference Manual
version 1.7' section 3.3.2 (page 52-53).
PdfObject
,
BadPdfFormatException
Constructor and Description |
---|
PdfNumber(double value)
Constructs a new
PdfNumber -object of type real. |
PdfNumber(float value)
Constructs a new
PdfNumber -object of type real. |
PdfNumber(int value)
Constructs a new
PdfNumber -object of type integer. |
PdfNumber(String content)
Constructs a
PdfNumber -object. |
Modifier and Type | Method and Description |
---|---|
double |
doubleValue()
Returns the primitive
double value of this object. |
float |
floatValue()
Returns the primitive
float value of this object. |
void |
increment()
Increments the value of the
PdfNumber -object by 1. |
int |
intValue()
Returns the primitive
int value of this object. |
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, toPdf, toString, type
public PdfNumber(String content)
PdfNumber
-object.content
- value of the new PdfNumber
-objectpublic PdfNumber(int value)
PdfNumber
-object of type integer.value
- value of the new PdfNumber
-objectpublic PdfNumber(double value)
PdfNumber
-object of type real.value
- value of the new PdfNumber
-objectpublic PdfNumber(float value)
PdfNumber
-object of type real.value
- value of the new PdfNumber
-objectpublic int intValue()
int
value of this object.int
public double doubleValue()
double
value of this object.double
public float floatValue()
float
value of this object.float
public void increment()
PdfNumber
-object by 1.Copyright © 2018. All rights reserved.