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
, Serialized Form
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(long value)
Constructs a new PdfNumber -object of type long.
|
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.
|
long |
longValue()
Returns the primitive long 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
-object
public PdfNumber(int value)
PdfNumber
-object of type integer.
value
- value of the new PdfNumber
-object
public PdfNumber(long value)
PdfNumber
-object of type long.
value
- value of the new PdfNumber
-object
public PdfNumber(double value)
PdfNumber
-object of type real.
value
- value of the new PdfNumber
-object
public PdfNumber(float value)
PdfNumber
-object of type real.
value
- value of the new PdfNumber
-object
public int intValue()
int
value of this object.
int
public long longValue()
long
value of this object.
long
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 © 2016. All rights reserved.