com.lowagie.text.pdf

## Class PdfNumber

- java.lang.Object
- - com.lowagie.text.pdf.PdfObject
  - - com.lowagie.text.pdf.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

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

### Fields inherited from class com.lowagie.text.pdf.PdfObject

`ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type`

### Constructor Summary

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

### Method Summary

Methods
`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.

### Methods inherited from class com.lowagie.text.pdf.PdfObject

`canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, toPdf, toString, type`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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

#### intValue

    public int intValue()

Returns the primitive `int` value of this object.

Returns:
  The value as `int`

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