com.lowagie.text.pdf

Class PdfNumber

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).

See Also: PdfObject BadPdfFormatException

Field Summary
doublevalue
actual value of this PdfNumber, represented as a double
Constructor Summary
PdfNumber(String content)
Constructs a PdfNumber-object.
PdfNumber(int value)
Constructs a new PdfNumber-object of type integer.
PdfNumber(double value)
Constructs a new PdfNumber-object of type real.
PdfNumber(float value)
Constructs a new PdfNumber-object of type real.
Method Summary
doubledoubleValue()
Returns the primitive double value of this object.
floatfloatValue()
Returns the primitive float value of this object.
voidincrement()
Increments the value of the PdfNumber-object by 1.
intintValue()
Returns the primitive int value of this object.

Field Detail

value

private double value
actual value of this PdfNumber, represented as a double

Constructor Detail

PdfNumber

public PdfNumber(String content)
Constructs a PdfNumber-object.

Parameters: content value of the new PdfNumber-object

PdfNumber

public PdfNumber(int value)
Constructs a new PdfNumber-object of type integer.

Parameters: value value of the new PdfNumber-object

PdfNumber

public PdfNumber(double value)
Constructs a new PdfNumber-object of type real.

Parameters: value value of the new PdfNumber-object

PdfNumber

public PdfNumber(float value)
Constructs a new PdfNumber-object of type real.

Parameters: value value of the new PdfNumber-object

Method Detail

doubleValue

public double doubleValue()
Returns the primitive double value of this object.

Returns: The value as double

floatValue

public float floatValue()
Returns the primitive float value of this object.

Returns: The value as float

increment

public void increment()
Increments the value of the PdfNumber-object by 1.

intValue

public int intValue()
Returns the primitive int value of this object.

Returns: The value as int