Save This Page
Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.common » [javadoc | source]
org.apache.pdfbox.pdmodel.common
public class: COSArrayList [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.common.COSArrayList

All Implemented Interfaces:
    List

This is an implementation of a List that will sync its contents to a COSArray.
Constructor:
 public COSArrayList() 
 public COSArrayList(List actualList,
    COSArray cosArray) 
    Constructor.
    Parameters:
    actualList - The list of standard java objects
    cosArray - The COS array object to sync to.
 public COSArrayList(Object actualObject,
    COSBase item,
    COSDictionary dictionary,
    COSName dictionaryKey) 
    This is a really special constructor. Sometimes the PDF spec says that a dictionary entry can either be a single item or an array of those items. But in the PDModel interface we really just want to always return a java.util.List. In the case were we get the list and never modify it we don't want to convert to COSArray and put one element, unless we append to the list. So here we are going to create this object with a single item instead of a list, but allow more items to be added and then converted to an array.
    Parameters:
    actualObject - The PDModel object.
    item - The COS Model object.
    dictionary - The dictionary that holds the item, and will hold the array if an item is added.
    dictionaryKey - The key into the dictionary to set the item.
 public COSArrayList(Object actualObject,
    COSBase item,
    COSDictionary dictionary,
    String dictionaryKey) 
    Method from org.apache.pdfbox.pdmodel.common.COSArrayList Summary:
    add,   add,   addAll,   addAll,   clear,   contains,   containsAll,   convertCOSNameCOSArrayToList,   convertCOSStringCOSArrayToList,   convertFloatCOSArrayToList,   convertIntegerCOSArrayToList,   convertStringListToCOSNameCOSArray,   convertStringListToCOSStringCOSArray,   converterToCOSArray,   equals,   get,   hashCode,   indexOf,   isEmpty,   iterator,   lastIndexOf,   listIterator,   listIterator,   remove,   remove,   removeAll,   retainAll,   set,   size,   subList,   toArray,   toArray,   toList,   toString
    Methods from java.lang.Object:
    clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from org.apache.pdfbox.pdmodel.common.COSArrayList Detail:
     public boolean add(Object o) 
      {@inheritDoc}
     public  void add(int index,
        Object element) 
      {@inheritDoc}
     public boolean addAll(Collection c) 
      {@inheritDoc}
     public boolean addAll(int index,
        Collection c) 
      {@inheritDoc}
     public  void clear() 
      {@inheritDoc}
     public boolean contains(Object o) 
      {@inheritDoc}
     public boolean containsAll(Collection c) 
      {@inheritDoc}
     public static List convertCOSNameCOSArrayToList(COSArray nameArray) 
      This will take an array of COSName and return a COSArrayList of java.lang.String values.
     public static List convertCOSStringCOSArrayToList(COSArray stringArray) 
      This will take an array of COSString and return a COSArrayList of java.lang.String values.
     public static List convertFloatCOSArrayToList(COSArray floatArray) 
      This will take an array of COSNumbers and return a COSArrayList of java.lang.Float values.
     public static List convertIntegerCOSArrayToList(COSArray intArray) 
      This will take an array of COSNumbers and return a COSArrayList of java.lang.Integer values.
     public static COSArray convertStringListToCOSNameCOSArray(List strings) 
      This will take an list of string objects and return a COSArray of COSName objects.
     public static COSArray convertStringListToCOSStringCOSArray(List strings) 
      This will take an list of string objects and return a COSArray of COSName objects.
     public static COSArray converterToCOSArray(List cosObjectableList) 
      This will convert a list of COSObjectables to an array list of COSBase objects.
     public boolean equals(Object o) 
      {@inheritDoc}
     public Object get(int index) 
      {@inheritDoc}
     public int hashCode() 
      {@inheritDoc}
     public int indexOf(Object o) 
      {@inheritDoc}
     public boolean isEmpty() 
      {@inheritDoc}
     public Iterator iterator() 
      {@inheritDoc}
     public int lastIndexOf(Object o) 
      {@inheritDoc}
     public ListIterator listIterator() 
      {@inheritDoc}
     public ListIterator listIterator(int index) 
      {@inheritDoc}
     public boolean remove(Object o) 
      {@inheritDoc}
     public Object remove(int index) 
      {@inheritDoc}
     public boolean removeAll(Collection c) 
      {@inheritDoc}
     public boolean retainAll(Collection c) 
      {@inheritDoc}
     public Object set(int index,
        Object element) 
      {@inheritDoc}
     public int size() 
      {@inheritDoc}
     public List subList(int fromIndex,
        int toIndex) 
      {@inheritDoc}
     public Object[] toArray() 
      {@inheritDoc}
     public Object[] toArray(Object[] a) 
      {@inheritDoc}
     public COSArray toList() 
      This will return then underlying COSArray.
     public String toString() 
      {@inheritDoc}