public class PdfNumber extends PdfPrimitiveObject
content, directOnly
ARRAY, BOOLEAN, DICTIONARY, FLUSHED, FORBID_RELEASE, FREE, INDIRECT_REFERENCE, indirectReference, LITERAL, MODIFIED, MUST_BE_FLUSHED, MUST_BE_INDIRECT, NAME, NULL, NUMBER, ORIGINAL_OBJECT_STREAM, READ_ONLY, READING, STREAM, STRING
Constructor and Description |
---|
PdfNumber(byte[] content) |
PdfNumber(double value) |
PdfNumber(int value) |
Modifier and Type | Method and Description |
---|---|
protected void |
copyContent(PdfObject from, PdfDocument document)
Copies object content from object 'from'.
|
PdfNumber |
copyTo(PdfDocument document)
Copies object to a specified document.
|
PdfNumber |
copyTo(PdfDocument document, boolean allowDuplicating)
Copies object to a specified document.
|
void |
decrement() |
double |
doubleValue() |
boolean |
equals(Object o) |
float |
floatValue() |
protected void |
generateContent() |
protected void |
generateValue() |
byte |
getType()
Gets object type.
|
double |
getValue() |
int |
hashCode() |
void |
increment() |
int |
intValue() |
protected boolean |
isDoubleNumber() |
long |
longValue() |
PdfNumber |
makeIndirect(PdfDocument document)
Marks object to be saved as indirect.
|
PdfNumber |
makeIndirect(PdfDocument document, PdfIndirectReference reference)
Marks object to be saved as indirect.
|
protected PdfNumber |
newInstance()
Creates new instance of object.
|
void |
setValue(double value) |
void |
setValue(int value) |
String |
toString() |
compareContent, getInternalContent, hasContent, setIndirectReference
checkState, clearState, clone, flush, flush, getIndirectReference, isArray, isBoolean, isDictionary, isFlushed, isIndirect, isIndirectReference, isLiteral, isModified, isName, isNull, isNumber, isStream, isString, release, setModified, setState
public PdfNumber(double value)
public PdfNumber(int value)
public PdfNumber(byte[] content)
public byte getType()
PdfObject
public double getValue()
public double doubleValue()
public float floatValue()
public long longValue()
public int intValue()
public void setValue(int value)
public void setValue(double value)
public void increment()
public void decrement()
public PdfNumber makeIndirect(PdfDocument document)
makeIndirect
in class PdfObject
document
- a document the indirect reference will belong to.
public PdfNumber makeIndirect(PdfDocument document, PdfIndirectReference reference)
makeIndirect
in class PdfPrimitiveObject
document
- a document the indirect reference will belong to.
public PdfNumber copyTo(PdfDocument document)
public PdfNumber copyTo(PdfDocument document, boolean allowDuplicating)
copyTo
in class PdfObject
document
- document to copy object to.
allowDuplicating
- indicates if to allow copy objects which already have been copied. If object is associated with any indirect reference and allowDuplicating is false then already existing reference will be returned instead of copying object. If allowDuplicating is true then object will be copied and new indirect reference will be assigned.
protected PdfNumber newInstance()
PdfObject
newInstance
in class PdfObject
protected boolean isDoubleNumber()
protected void generateContent()
generateContent
in class PdfPrimitiveObject
protected void generateValue()
protected void copyContent(PdfObject from, PdfDocument document)
PdfObject
copyContent
in class PdfPrimitiveObject
from
- object to copy content from.
document
- document to copy object to.
Copyright © 1998–2016 iText Group NV. All rights reserved.