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 Array<TItem extends IPdfObjectWrapper>

    java.lang.Object
      org.pdfclown.objects.PdfObjectWrapper<PdfArray>
          org.pdfclown.objects.Array<TItem>

All Implemented Interfaces:
  Cloneable, Iterable<TItem>, Collection<TItem>, List<TItem>, IPdfObjectWrapper

Direct Known Subclasses:
  Articles, LayerGroup, Layers, PageElements

    public class Array<TItem extends IPdfObjectWrapper>

extends PdfObjectWrapper<PdfArray>
implements List<TItem>

Collection of sequentially-arranged object wrappers.

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

Nested Class Summary
`static interface` | `Array.IWrapper<TItem>` Item instancer.

Constructor Summary
`protected` | `Array(Array.IWrapper<TItem> itemWrapper, PdfDirectObject baseObject)` Wraps an existing base array using the specified wrapper for wrapping its items.
`protected` | `Array(Class<TItem> itemClass, PdfDirectObject baseObject)` Wraps an existing base array using the default wrapper for wrapping its items.
`` | `Array(Document context, Array.IWrapper<TItem> itemWrapper)` Wraps a new base array using the specified wrapper for wrapping its items.
`` | `Array(Document context, Array.IWrapper<TItem> itemWrapper, PdfArray baseDataObject)` Wraps the specified base array using the specified wrapper for wrapping its items.
`` | `Array(Document context, Class<TItem> itemClass)` Wraps a new base array using the default wrapper for wrapping its items.
`` | `Array(Document context, Class<TItem> itemClass, PdfArray baseDataObject)` Wraps the specified base array using the default wrapper for wrapping its items.

Method Summary
`void` | `add(int index, TItem item)`
`boolean` | `add(TItem item)`
`boolean` | `addAll(Collection<? extends TItem> items)`
`boolean` | `addAll(int index, Collection<? extends TItem> items)`
`void` | `clear()`
`Array<TItem>` | `clone(Document context)` Gets a clone of the object, registered inside the given document context.
`boolean` | `contains(Object item)`
`boolean` | `containsAll(Collection<?> items)`
`TItem` | `get(int index)`
`int` | `indexOf(Object item)`
`boolean` | `isEmpty()`
`Iterator<TItem>` | `iterator()`
`int` | `lastIndexOf(Object item)`
`ListIterator<TItem>` | `listIterator()`
`ListIterator<TItem>` | `listIterator(int index)`
`TItem` | `remove(int index)`
`boolean` | `remove(Object item)`
`boolean` | `removeAll(Collection<?> items)`
`boolean` | `retainAll(Collection<?> items)`
`TItem` | `set(int index, TItem item)`
`int` | `size()`
`List<TItem>` | `subList(int fromIndex, int toIndex)`
`Object[]` | `toArray()`
`
`<T> T[]`
` | `toArray(T[] array)`
`static
`<TItem extends IPdfObjectWrapper> Array<TItem>`
` | `wrap(Array.IWrapper<TItem> itemWrapper, PdfDirectObject baseObject)` Wraps an existing base array using the specified wrapper for wrapping its items.
`static
`<TItem extends IPdfObjectWrapper> Array<TItem>`
` | `wrap(Class<TItem> itemClass, PdfDirectObject baseObject)` Wraps an existing base array using the default wrapper for wrapping its items.

Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
`checkCompatibility, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata`

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

Methods inherited from interface java.util.List
`equals, hashCode`

Constructor Detail

### Array

    public Array(Document context,
                 Class<TItem> itemClass)

  Wraps a new base array using the default wrapper for wrapping its items.

  Parameters:
    `context` - Document context.
    `itemClass` - Item class.

### Array

    public Array(Document context,
                 Array.IWrapper<TItem> itemWrapper)

  Wraps a new base array using the specified wrapper for wrapping its items.

  Parameters:
    `context` - Document context.
    `itemWrapper` - Item wrapper.

### Array

    public Array(Document context,
                 Class<TItem> itemClass,
                 PdfArray baseDataObject)

  Wraps the specified base array using the default wrapper for wrapping its items.

  Parameters:
    `context` - Document context.
    `itemClass` - Item class.
    `baseDataObject` - Base array.

### Array

    public Array(Document context,
                 Array.IWrapper<TItem> itemWrapper,
                 PdfArray baseDataObject)

  Wraps the specified base array using the specified wrapper for wrapping its items.

  Parameters:
    `context` - Document context.
    `itemWrapper` - Item wrapper.
    `baseDataObject` - Base array.

### Array

    protected Array(Class<TItem> itemClass,
                    PdfDirectObject baseObject)

  Wraps an existing base array using the default wrapper for wrapping its items.

  Parameters:
    `itemClass` - Item class.
    `baseObject` - Base array. MUST be a `reference` every time available.

### Array

    protected Array(Array.IWrapper<TItem> itemWrapper,
                    PdfDirectObject baseObject)

  Wraps an existing base array using the specified wrapper for wrapping its items.

  Parameters:
    `itemWrapper` - Item wrapper.
    `baseObject` - Base array. MUST be a `reference` every time available.

Method Detail

### wrap

    public static <TItem extends IPdfObjectWrapper> Array<TItem> wrap(Class<TItem> itemClass,
                                                                      PdfDirectObject baseObject)

  Wraps an existing base array using the default wrapper for wrapping its items.

  Parameters:
    `itemClass` - Item class.
    `baseObject` - Base array. MUST be a `reference` every time available.

### wrap

    public static <TItem extends IPdfObjectWrapper> Array<TItem> wrap(Array.IWrapper<TItem> itemWrapper,
                                                                      PdfDirectObject baseObject)

  Wraps an existing base array using the specified wrapper for wrapping its items.

  Parameters:
    `itemWrapper` - Item wrapper.
    `baseObject` - Base array. MUST be a `reference` every time available.

### clone

    public Array<TItem> clone(Document context)

  Description copied from class: `PdfObjectWrapper`
  Gets a clone of the object, registered inside the given document context.

  Overrides:
    `clone` in class `PdfObjectWrapper<PdfArray>`
  Parameters:
    `context` - Which document the clone has to be registered in.

### add

    public boolean add(TItem item)

  Specified by:
    `add` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `add` in interface `List<TItem extends IPdfObjectWrapper>`

### add

    public void add(int index,
                    TItem item)

  Specified by:
    `add` in interface `List<TItem extends IPdfObjectWrapper>`

### addAll

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

  Specified by:
    `addAll` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `addAll` in interface `List<TItem extends IPdfObjectWrapper>`

### addAll

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

  Specified by:
    `addAll` in interface `List<TItem extends IPdfObjectWrapper>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `clear` in interface `List<TItem extends IPdfObjectWrapper>`

### contains

    public boolean contains(Object item)

  Specified by:
    `contains` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `contains` in interface `List<TItem extends IPdfObjectWrapper>`

### containsAll

    public boolean containsAll(Collection<?> items)

  Specified by:
    `containsAll` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `containsAll` in interface `List<TItem extends IPdfObjectWrapper>`

### get

    public TItem get(int index)

  Specified by:
    `get` in interface `List<TItem extends IPdfObjectWrapper>`

### indexOf

    public int indexOf(Object item)

  Specified by:
    `indexOf` in interface `List<TItem extends IPdfObjectWrapper>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `isEmpty` in interface `List<TItem extends IPdfObjectWrapper>`

### iterator

    public Iterator<TItem> iterator()

  Specified by:
    `iterator` in interface `Iterable<TItem extends IPdfObjectWrapper>`
  Specified by:
    `iterator` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `iterator` in interface `List<TItem extends IPdfObjectWrapper>`

### lastIndexOf

    public int lastIndexOf(Object item)

  Specified by:
    `lastIndexOf` in interface `List<TItem extends IPdfObjectWrapper>`

### listIterator

    public ListIterator<TItem> listIterator()

  Specified by:
    `listIterator` in interface `List<TItem extends IPdfObjectWrapper>`

### listIterator

    public ListIterator<TItem> listIterator(int index)

  Specified by:
    `listIterator` in interface `List<TItem extends IPdfObjectWrapper>`

### remove

    public boolean remove(Object item)

  Specified by:
    `remove` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `remove` in interface `List<TItem extends IPdfObjectWrapper>`

### remove

    public TItem remove(int index)

  Specified by:
    `remove` in interface `List<TItem extends IPdfObjectWrapper>`

### removeAll

    public boolean removeAll(Collection<?> items)

  Specified by:
    `removeAll` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `removeAll` in interface `List<TItem extends IPdfObjectWrapper>`

### retainAll

    public boolean retainAll(Collection<?> items)

  Specified by:
    `retainAll` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `retainAll` in interface `List<TItem extends IPdfObjectWrapper>`

### set

    public TItem set(int index,
                     TItem item)

  Specified by:
    `set` in interface `List<TItem extends IPdfObjectWrapper>`

### size

    public int size()

  Specified by:
    `size` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `size` in interface `List<TItem extends IPdfObjectWrapper>`

### subList

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

  Specified by:
    `subList` in interface `List<TItem extends IPdfObjectWrapper>`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `toArray` in interface `List<TItem extends IPdfObjectWrapper>`

### toArray

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

  Specified by:
    `toArray` in interface `Collection<TItem extends IPdfObjectWrapper>`
  Specified by:
    `toArray` in interface `List<TItem extends IPdfObjectWrapper>`

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.