Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.objects
Class PdfArray

    java.lang.Object
      org.pdfclown.objects.PdfObject
          org.pdfclown.objects.PdfDataObject
              org.pdfclown.objects.PdfDirectObject
                  org.pdfclown.objects.PdfArray

All Implemented Interfaces:
  Cloneable, Comparable<PdfDirectObject>, Iterable<PdfDirectObject>, Collection<PdfDirectObject>, List<PdfDirectObject>, IVisitable

    public final class PdfArray

extends PdfDirectObject
implements List<PdfDirectObject>

PDF array object, that is a one-dimensional collection of (possibly-heterogeneous) objects arranged sequentially [PDF:1.7:3.2.5].

Since:
  0.0.0
Version:
  0.1.2, 01/09/13
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
`PdfArray()`
`PdfArray(int capacity)`
`PdfArray(List<? extends PdfDirectObject> items)`
`PdfArray(PdfDirectObject... items)`

Method Summary
`PdfObject` | `accept(IVisitor visitor, Object data)` Accepts a visit.
`void` | `add(int index, PdfDirectObject item)`
`boolean` | `add(PdfDirectObject item)`
`boolean` | `addAll(Collection<? extends PdfDirectObject> items)`
`boolean` | `addAll(int index, Collection<? extends PdfDirectObject> items)`
`void` | `clear()`
`PdfArray` | `clone(File context)` Creates a deep copy of this object within the specified file context.
`int` | `compareTo(PdfDirectObject obj)`
`boolean` | `contains(Object item)`
`boolean` | `containsAll(Collection<?> items)`
`boolean` | `equals(Object object)`
`PdfDirectObject` | `get(int index)`
`
`<T extends PdfDataObject> PdfDirectObject`
` | `get(int index, Class<T> itemClass)` Gets the value corresponding to the given index, forcing its instantiation as a direct object in case of missing entry.
`
`<T extends PdfDataObject> PdfDirectObject`
` | `get(int index, Class<T> itemClass, boolean direct)` Gets the value corresponding to the given index, forcing its instantiation in case of missing entry.
`PdfObject` | `getParent()` Gets the parent of this object.
`int` | `hashCode()`
`int` | `indexOf(Object item)`
`boolean` | `isEmpty()`
`boolean` | `isUpdateable()` Gets whether the detection of object state changes is enabled.
`boolean` | `isUpdated()` Gets whether the initial state of this object has been modified.
`protected boolean` | `isVirtual()` Gets whether this object acts like a null-object placeholder.
`Iterator<PdfDirectObject>` | `iterator()`
`int` | `lastIndexOf(Object item)`
`ListIterator<PdfDirectObject>` | `listIterator()`
`ListIterator<PdfDirectObject>` | `listIterator(int index)`
`PdfDirectObject` | `remove(int index)`
`boolean` | `remove(Object item)`
`boolean` | `removeAll(Collection<?> items)`
`PdfDataObject` | `resolve(int index)` Gets the dereferenced value corresponding to the given index.
`
`<T extends PdfDataObject> T`
` | `resolve(int index, Class<T> itemClass)` Gets the dereferenced value corresponding to the given index, forcing its instantiation in case of missing entry.
`boolean` | `retainAll(Collection<?> items)`
`PdfDirectObject` | `set(int index, PdfDirectObject item)`
`void` | `setUpdateable(boolean value)`
`protected void` | `setUpdated(boolean value)`
`protected void` | `setVirtual(boolean value)`
`int` | `size()`
`List<PdfDirectObject>` | `subList(int fromIndex, int toIndex)`
`PdfArray` | `swap(PdfObject other)` Swaps contents between this object and the other one.
`Object[]` | `toArray()`
`
`<T> T[]`
` | `toArray(T[] items)`
`String` | `toString()`
`void` | `writeTo(IOutputStream stream, File context)` Serializes this object to the specified stream.

Methods inherited from class org.pdfclown.objects.PdfObject
`clone, clone, getContainer, getDataContainer, getFile, getIndirectObject, getReference, resolve, resolve, unresolve, unresolve, update`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PdfArray

    public PdfArray()

### PdfArray

    public PdfArray(int capacity)

### PdfArray

    public PdfArray(PdfDirectObject... items)

### PdfArray

    public PdfArray(List<? extends PdfDirectObject> items)

Method Detail

### accept

    public PdfObject accept(IVisitor visitor,
                            Object data)

  Description copied from interface: `IVisitable`
  Accepts a visit.

  Specified by:
    `accept` in interface `IVisitable`
  Parameters:
    `visitor` - Visiting object.
    `data` - Supplemental data.
  Returns:
    Result object.

### clone

    public PdfArray clone(File context)

  Description copied from class: `PdfObject`
  Creates a deep copy of this object within the specified file context.

  Overrides:
    `clone` in class `PdfObject`

### compareTo

    public int compareTo(PdfDirectObject obj)

  Specified by:
    `compareTo` in interface `Comparable<PdfDirectObject>`
  Specified by:
    `compareTo` in class `PdfDirectObject`

### get

    public <T extends PdfDataObject> PdfDirectObject get(int index,
                                                         Class<T> itemClass)

  Gets the value corresponding to the given index, forcing its instantiation as a direct object in case of missing entry.

  Parameters:
    `index` - Index of the item to return.
    `itemClass` - Class to use for instantiating the item in case of missing entry.
  Since:
    0.1.2

### get

    public <T extends PdfDataObject> PdfDirectObject get(int index,
                                                         Class<T> itemClass,
                                                         boolean direct)

  Gets the value corresponding to the given index, forcing its instantiation in case of missing entry.

  Parameters:
    `index` - Index of the item to return.
    `itemClass` - Class to use for instantiating the item in case of missing entry.
    `direct` - Whether the item has to be instantiated directly within its container instead of being referenced through an indirect object.
  Since:
    0.1.2

### getParent

    public PdfObject getParent()

  Description copied from class: `PdfObject`
  Gets the parent of this object.

  Specified by:
    `getParent` in class `PdfObject`
  See Also:
    `PdfObject.getContainer()`

### isUpdateable

    public boolean isUpdateable()

  Description copied from class: `PdfObject`
  Gets whether the detection of object state changes is enabled.

  Specified by:
    `isUpdateable` in class `PdfObject`

### isUpdated

    public boolean isUpdated()

  Description copied from class: `PdfObject`
  Gets whether the initial state of this object has been modified.

  Specified by:
    `isUpdated` in class `PdfObject`

### resolve

    public PdfDataObject resolve(int index)

  Gets the dereferenced value corresponding to the given index.

  This method takes care to resolve the value returned by `get(int)`.

  Parameters:
    `index` - Index of the item to return.
  Since:
    0.0.8

### resolve

    public <T extends PdfDataObject> T resolve(int index,
                                               Class<T> itemClass)

  Gets the dereferenced value corresponding to the given index, forcing its instantiation in case of missing entry.

  This method takes care to resolve the value returned by `get(int, Class)`.

  Parameters:
    `index` - Index of the item to return.
    `itemClass` - Class to use for instantiating the item in case of missing entry.
  Since:
    0.1.2

### setUpdateable

    public void setUpdateable(boolean value)

  Specified by:
    `setUpdateable` in class `PdfObject`
  See Also:
    `PdfObject.isUpdateable()`

### swap

    public PdfArray swap(PdfObject other)

  Description copied from class: `PdfObject`
  Swaps contents between this object and the other one.

  Specified by:
    `swap` in class `PdfObject`
  Parameters:
    `other` - Object whose contents have to be swapped with this one's.
  Returns:
    This object.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### writeTo

    public void writeTo(IOutputStream stream,
                        File context)

  Description copied from class: `PdfObject`
  Serializes this object to the specified stream.

  Specified by:
    `writeTo` in class `PdfObject`
  Parameters:
    `stream` - Target stream.
    `context` - File context.

### add

    public void add(int index,
                    PdfDirectObject item)

  Specified by:
    `add` in interface `List<PdfDirectObject>`

### addAll

    public boolean addAll(int index,
                          Collection<? extends PdfDirectObject> items)

  Specified by:
    `addAll` in interface `List<PdfDirectObject>`

### get

    public PdfDirectObject get(int index)

  Specified by:
    `get` in interface `List<PdfDirectObject>`

### indexOf

    public int indexOf(Object item)

  Specified by:
    `indexOf` in interface `List<PdfDirectObject>`

### lastIndexOf

    public int lastIndexOf(Object item)

  Specified by:
    `lastIndexOf` in interface `List<PdfDirectObject>`

### listIterator

    public ListIterator<PdfDirectObject> listIterator()

  Specified by:
    `listIterator` in interface `List<PdfDirectObject>`

### listIterator

    public ListIterator<PdfDirectObject> listIterator(int index)

  Specified by:
    `listIterator` in interface `List<PdfDirectObject>`

### remove

    public PdfDirectObject remove(int index)

  Specified by:
    `remove` in interface `List<PdfDirectObject>`

### set

    public PdfDirectObject set(int index,
                               PdfDirectObject item)

  Specified by:
    `set` in interface `List<PdfDirectObject>`

### subList

    public List<PdfDirectObject> subList(int fromIndex,
                                         int toIndex)

  Specified by:
    `subList` in interface `List<PdfDirectObject>`

### add

    public boolean add(PdfDirectObject item)

  Specified by:
    `add` in interface `Collection<PdfDirectObject>`
  Specified by:
    `add` in interface `List<PdfDirectObject>`

### addAll

    public boolean addAll(Collection<? extends PdfDirectObject> items)

  Specified by:
    `addAll` in interface `Collection<PdfDirectObject>`
  Specified by:
    `addAll` in interface `List<PdfDirectObject>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection<PdfDirectObject>`
  Specified by:
    `clear` in interface `List<PdfDirectObject>`

### contains

    public boolean contains(Object item)

  Specified by:
    `contains` in interface `Collection<PdfDirectObject>`
  Specified by:
    `contains` in interface `List<PdfDirectObject>`

### containsAll

    public boolean containsAll(Collection<?> items)

  Specified by:
    `containsAll` in interface `Collection<PdfDirectObject>`
  Specified by:
    `containsAll` in interface `List<PdfDirectObject>`

### equals

    public boolean equals(Object object)

  Specified by:
    `equals` in interface `Collection<PdfDirectObject>`
  Specified by:
    `equals` in interface `List<PdfDirectObject>`
  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Collection<PdfDirectObject>`
  Specified by:
    `hashCode` in interface `List<PdfDirectObject>`
  Overrides:
    `hashCode` in class `Object`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection<PdfDirectObject>`
  Specified by:
    `isEmpty` in interface `List<PdfDirectObject>`

### remove

    public boolean remove(Object item)

  Specified by:
    `remove` in interface `Collection<PdfDirectObject>`
  Specified by:
    `remove` in interface `List<PdfDirectObject>`

### removeAll

    public boolean removeAll(Collection<?> items)

  Specified by:
    `removeAll` in interface `Collection<PdfDirectObject>`
  Specified by:
    `removeAll` in interface `List<PdfDirectObject>`

### retainAll

    public boolean retainAll(Collection<?> items)

  Specified by:
    `retainAll` in interface `Collection<PdfDirectObject>`
  Specified by:
    `retainAll` in interface `List<PdfDirectObject>`

### size

    public int size()

  Specified by:
    `size` in interface `Collection<PdfDirectObject>`
  Specified by:
    `size` in interface `List<PdfDirectObject>`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `Collection<PdfDirectObject>`
  Specified by:
    `toArray` in interface `List<PdfDirectObject>`

### toArray

    public <T> T[] toArray(T[] items)

  Specified by:
    `toArray` in interface `Collection<PdfDirectObject>`
  Specified by:
    `toArray` in interface `List<PdfDirectObject>`

### iterator

    public Iterator<PdfDirectObject> iterator()

  Specified by:
    `iterator` in interface `Iterable<PdfDirectObject>`
  Specified by:
    `iterator` in interface `Collection<PdfDirectObject>`
  Specified by:
    `iterator` in interface `List<PdfDirectObject>`

### isVirtual

    protected boolean isVirtual()

  Description copied from class: `PdfObject`
  Gets whether this object acts like a null-object placeholder.

  Specified by:
    `isVirtual` in class `PdfObject`

### setUpdated

    protected void setUpdated(boolean value)

  Specified by:
    `setUpdated` in class `PdfObject`
  See Also:
    `PdfObject.isUpdated()`

### setVirtual

    protected void setVirtual(boolean value)

  Specified by:
    `setVirtual` in class `PdfObject`
  See Also:
    `PdfObject.isVirtual()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.