java.lang.Iterable<COSBase>, COSUpdateInfo, COSObjectablepublic class COSArray extends COSBase implements java.lang.Iterable<COSBase>, COSUpdateInfo
| Constructor | Description |
|---|---|
COSArray() |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
accept(ICOSVisitor visitor) |
visitor pattern double dispatch method.
|
void |
add(int i,
COSBase object) |
Add the specified object at the ith location and push the rest to the
right.
|
void |
add(COSBase object) |
This will add an object to the array.
|
void |
add(COSObjectable object) |
This will add an object to the array.
|
void |
addAll(int i,
java.util.Collection<COSBase> objectList) |
Add the specified object at the ith location and push the rest to the
right.
|
void |
addAll(java.util.Collection<COSBase> objectsList) |
This will add an object to the array.
|
void |
addAll(COSArray objectList) |
This will add all objects to this array.
|
void |
clear() |
This will remove all of the objects in the collection.
|
COSBase |
get(int index) |
This will get an object from the array.
|
int |
getInt(int index) |
Get the value of the array as an integer.
|
int |
getInt(int index,
int defaultValue) |
Get the value of the array as an integer, return the default if it does not exist.
|
java.lang.String |
getName(int index) |
Get the value of the array as a string.
|
java.lang.String |
getName(int index,
java.lang.String defaultValue) |
Get an entry in the array that is expected to be a COSName.
|
COSBase |
getObject(int index) |
This will get an object from the array.
|
java.lang.String |
getString(int index) |
Get the value of the array as a string.
|
java.lang.String |
getString(int index,
java.lang.String defaultValue) |
Get an entry in the array that is expected to be a COSName.
|
void |
growToSize(int size) |
This will add null values until the size of the array is at least
as large as the parameter.
|
void |
growToSize(int size,
COSBase object) |
This will add the object until the size of the array is at least
as large as the parameter.
|
int |
indexOf(COSBase object) |
This will return the index of the entry or -1 if it is not found.
|
int |
indexOfObject(COSBase object) |
This will return the index of the entry or -1 if it is not found.
|
boolean |
isNeedToBeUpdated() |
Get the update state for the COSWriter.
|
java.util.Iterator<COSBase> |
iterator() |
Get access to the list.
|
COSBase |
remove(int i) |
This will remove an element from the array.
|
boolean |
remove(COSBase o) |
This will remove an element from the array.
|
void |
removeAll(java.util.Collection<COSBase> objectsList) |
This will remove all of the objects in the collection.
|
boolean |
removeObject(COSBase o) |
This will remove an element from the array.
|
void |
retainAll(java.util.Collection<COSBase> objectsList) |
This will retain all of the objects in the collection.
|
void |
set(int index,
int intVal) |
This will set an object at a specific index.
|
void |
set(int index,
COSBase object) |
This will set an object at a specific index.
|
void |
set(int index,
COSObjectable object) |
This will set an object at a specific index.
|
void |
setFloatArray(float[] value) |
Clear the current contents of the COSArray and set it with the float[].
|
void |
setInt(int index,
int value) |
Set the value in the array as an integer.
|
void |
setName(int index,
java.lang.String name) |
Set the value in the array as a name.
|
void |
setNeedToBeUpdated(boolean flag) |
Set the update state of the dictionary for the COSWriter.
|
void |
setString(int index,
java.lang.String string) |
Set the value in the array as a string.
|
int |
size() |
This will get the size of this array.
|
float[] |
toFloatArray() |
This will take an COSArray of numbers and convert it to a float[].
|
java.util.List<? extends COSBase> |
toList() |
Return contents of COSArray as a Java List.
|
java.lang.String |
toString() |
getCOSObject, isDirect, setDirectpublic void add(COSBase object)
object - The object to add to the array.public void add(COSObjectable object)
object - The object to add to the array.public void add(int i,
COSBase object)
i - The index to add at.object - The object to add at that index.public void clear()
public void removeAll(java.util.Collection<COSBase> objectsList)
objectsList - The list of objects to remove from the collection.public void retainAll(java.util.Collection<COSBase> objectsList)
objectsList - The list of objects to retain from the collection.public void addAll(java.util.Collection<COSBase> objectsList)
objectsList - The object to add to the array.public void addAll(COSArray objectList)
objectList - The objects to add.public void addAll(int i,
java.util.Collection<COSBase> objectList)
i - The index to add at.objectList - The object to add at that index.public void set(int index,
COSBase object)
index - zero based index into array.object - The object to set.public void set(int index,
int intVal)
index - zero based index into array.intVal - The object to set.public void set(int index,
COSObjectable object)
index - zero based index into array.object - The object to set.public COSBase getObject(int index)
index - The index into the array to get the object.public COSBase get(int index)
index - The index into the array to get the object.public int getInt(int index)
index - The index into the list.public int getInt(int index,
int defaultValue)
index - The value of the array.defaultValue - The value to return if the value is null.public void setInt(int index,
int value)
index - The index into the array.value - The value to set.public void setName(int index,
java.lang.String name)
index - The index into the array.name - The name to set in the array.public java.lang.String getName(int index)
index - The index into the array.public java.lang.String getName(int index,
java.lang.String defaultValue)
index - The index into the array.defaultValue - The value to return if it is null.public void setString(int index,
java.lang.String string)
index - The index into the array.string - The string to set in the array.public java.lang.String getString(int index)
index - The index into the array.public java.lang.String getString(int index,
java.lang.String defaultValue)
index - The index into the array.defaultValue - The value to return if it is null.public int size()
public COSBase remove(int i)
i - The index of the object to remove.public boolean remove(COSBase o)
o - The object to remove.true if the object was removed, false
otherwisepublic boolean removeObject(COSBase o)
o - The object to remove.true if the object was removed, false
otherwisepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Iterator<COSBase> iterator()
iterator in interface java.lang.Iterable<COSBase>public int indexOf(COSBase object)
object - The object to search for.public int indexOfObject(COSBase object)
object - The object to search for.public void growToSize(int size)
size - The desired size of the array.public void growToSize(int size,
COSBase object)
size - The desired size of the array.object - The object to fill the array with.public java.lang.Object accept(ICOSVisitor visitor) throws java.io.IOException
public boolean isNeedToBeUpdated()
COSUpdateInfoisNeedToBeUpdated in interface COSUpdateInfopublic void setNeedToBeUpdated(boolean flag)
COSUpdateInfosetNeedToBeUpdated in interface COSUpdateInfoflag - the update state.public float[] toFloatArray()
public void setFloatArray(float[] value)
value - The new value of the float array.public java.util.List<? extends COSBase> toList()
Copyright © 2002–2018. All rights reserved.