public class PDFArray extends PDFObject
A PDFArray is a heterogenous collection object that gathers other PDFObjects (including other PDFArrays) into an indexed list.
| Constructor and Description |
|---|
PDFArray(Document doc,
boolean indirect)
General constructor
|
PDFArray(PDFObject docFromObj,
boolean indirect)
General constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(PDFObject object)
Adds an object to the end of the array
|
void |
delete() |
PDFObject |
get(int index)
Returns the object at the given index.
|
int |
getLength()
The number of elements in this array.
|
void |
insert(int index,
PDFObject object)
Inserts an object at the given index, displacing existing objects.
|
void |
put(int index,
PDFObject obj)
Puts an object at the given index, replacing the existing item.
|
void |
remove(PDFObject object)
Removes the first object that matches the given object.
|
void |
removeAt(int index)
Removes the object at the given index.
|
java.lang.String |
toString() |
clone, clone, clone, clone, clone, compareTo, destroy, enumPDFObjects, equals, getDocument, getGeneration, getID, getIndirect, getPDFHashValuepublic PDFArray(Document doc, boolean indirect)
doc - Document object containing this PDFArrayindirect - flag marking this as an indirect PDFObjectpublic PDFArray(PDFObject docFromObj, boolean indirect)
docFromObj - The new PDFArray will be created in the same document as this object.indirect - flag marking this as an indirect PDFObjectpublic void add(PDFObject object)
public void put(int index,
PDFObject obj)
public void insert(int index,
PDFObject object)
public void remove(PDFObject object)
public void removeAt(int index)
public PDFObject get(int index)
public int getLength()