Class PdfNumber
java.lang.Object
com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfObject
com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfNumber
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.3'
section 4.3 (page 37).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleactual value of thisPdfNumber, represented as adouble -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the primitivedoublevalue of this object.floatvoidIncrements the value of thePdfNumber-object with 1.intintValue()Returns the primitiveintvalue of this object.Methods inherited from class PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, toPdf, toString, type
-
Field Details
-
value
private double valueactual value of thisPdfNumber, represented as adouble
-
-
Constructor Details
-
PdfNumber
Constructs aPdfNumber-object.- Parameters:
content- value of the newPdfNumber-object
-
PdfNumber
public PdfNumber(int value) Constructs a new INTEGERPdfNumber-object.- Parameters:
value- value of the newPdfNumber-object
-
PdfNumber
public PdfNumber(double value) Constructs a new REALPdfNumber-object.- Parameters:
value- value of the newPdfNumber-object
-
PdfNumber
public PdfNumber(float value) Constructs a new REALPdfNumber-object.- Parameters:
value- value of the newPdfNumber-object
-
-
Method Details
-
intValue
public int intValue()Returns the primitiveintvalue of this object.- Returns:
- a value
-
doubleValue
public double doubleValue()Returns the primitivedoublevalue of this object.- Returns:
- a value
-
floatValue
public float floatValue() -
increment
public void increment()Increments the value of thePdfNumber-object with 1.
-