E - Element type.public class COSArrayList<E> extends Object implements List<E>
| Constructor and Description |
|---|
COSArrayList()
Default constructor.
|
COSArrayList(COSDictionary dictionary,
COSName dictionaryKey)
This constructor is to be used if the array doesn't exist, but is to be created and added to
the parent dictionary as soon as the first element is added to the array.
|
COSArrayList(E actualObject,
COSBase item,
COSDictionary dictionary,
COSName dictionaryKey)
This is a really special constructor.
|
COSArrayList(List<E> actualList,
COSArray cosArray)
Create the COSArrayList specifying the List and the backing COSArray.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
static COSArray |
converterToCOSArray(List<?> cosObjectableList)
This will convert a list of COSObjectables to an array list of COSBase objects.
|
boolean |
equals(Object o) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<X> X[] |
toArray(X[] a) |
COSArray |
toList()
This will return then underlying COSArray.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic COSArrayList()
public COSArrayList(List<E> actualList, COSArray cosArray)
User of this constructor need to ensure that the entries in the List and the backing COSArray are matching i.e. the COSObject of the List entry is included in the COSArray.
If the number of entries in the List and the COSArray differ it is assumed that the List has been filtered. In that case the COSArrayList shall only be used for reading purposes and no longer for updating.
actualList - The list of standard java objectscosArray - The COS array object to sync to.public COSArrayList(COSDictionary dictionary, COSName dictionaryKey)
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(E actualObject, COSBase item, COSDictionary dictionary, COSName dictionaryKey)
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 int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <X> X[] toArray(X[] a)
public boolean add(E o)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index,
Collection<? extends E> c)
public static COSArray converterToCOSArray(List<?> cosObjectableList)
cosObjectableList - A list of COSObjectable.IllegalArgumentException - if an object type is not supported for conversion to a
COSBase object.public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public boolean equals(Object o)
public int hashCode()
public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public ListIterator<E> listIterator()
listIterator in interface List<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>public COSArray toList()
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.