public class PdfArray extends PdfObject
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
_a
The contents of the array.
|
Modifier | Constructor and Description |
---|---|
protected |
PdfArray()
A protected constructor intended to be called only from
wrap(List) . |
|
PdfArray(java.util.List a)
Constructs an array object from a list of
PdfObject instances. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this instance with another PDF object for equality.
|
protected PdfObject |
filterContents(PdfObjectFilter f)
Second stage filtering, called by
filter(PdfObjectFilter) . |
java.util.List |
getList()
Returns the list of elements contained in this array.
|
int |
hashCode()
Returns a hash code for this object.
|
protected static PdfArray |
wrap(java.util.List a)
A factory for fast construction of this class.
|
protected int |
writePdf(PdfWriter w,
boolean spacing)
Writes this object in PDF format.
|
protected PdfArray()
wrap(List)
.public PdfArray(java.util.List a)
PdfObject
instances.a
- the list containing the PdfObject
instances.protected PdfObject filterContents(PdfObjectFilter f) throws PdfFormatException
PdfObject
filter(PdfObjectFilter)
. This is
only called if PdfObjectFilter.preFilter(PdfObject)
did not return
null
.filterContents
in class PdfObject
PdfFormatException
public boolean equals(java.lang.Object obj)
PdfObject
public java.util.List getList()
List
object is unmodifiable.public int hashCode()
PdfObject
protected static PdfArray wrap(java.util.List a)
List
. The calling method must ensure that the
List
is never externally modified, in order to
meet the immutability requirement of PdfObject
.a
- the List
to be used to back this
array.protected int writePdf(PdfWriter w, boolean spacing) throws java.io.IOException
PdfObject
writePdf
in class PdfObject
w
- the PdfWriter
to write to.spacing
- specifies whether to add white-space before
the object. A value of true
enables the
addition of white-space. If the object begins with a PDF
delimiter, then this option is ignored and no white-space
is written.java.io.IOException