OutlineCollection

Inheritance: java.lang.Object, com.aspose.pdf.Outlines

public final class OutlineCollection extends Outlines

Represents document outline hierarchy.

Methods

MethodDescription
hasNext()
next()
getVisibleCount()Count is the sum of the number of visible descendent outline items at all levels.
size()Gets the total number of outline items (bookmarks) at all levels of the document outline.
getFirst()Gets an outline item representing the first top-level item in the outline.
getLast()Gets an outline item representing the last top-level item in the outline.
isSynchronized()Gets a value indicating whether access to this collection is synchronized (thread safe).
getSyncRoot()Gets an object that can be used to synchronize access to this collection.
isReadOnly()Gets a value indicating whether the collection is read-only.
add(OutlineItemCollection outline)Adds outline item to collection.
delete()Deletes all outline items from the document outline.
delete(String name)Deletes the outline item with specified title from the document outline.
copyTo(OutlineItemCollection[] array, int index)Copies the outline items to an System.Array, starting at a particular System.Array index.
iterator()Returns an enumerator that iterates through the collection.
clear()Clears all items from the collection.
contains(OutlineItemCollection item)Not supported yet.
remove(OutlineItemCollection item)Not supported yet.
remove(int index)Remove item by index.
get_Item(int index)Gets outline item from collection by index.

hasNext()

public boolean hasNext()

Returns: boolean

next()

public OutlineItemCollection next()

Returns: OutlineItemCollection

getVisibleCount()

public int getVisibleCount()

Count is the sum of the number of visible descendent outline items at all levels. Note: please don’t confuse with Count which is number if items in collection.

Returns: int

size()

public int size()

Gets the total number of outline items (bookmarks) at all levels of the document outline.

Returns: int - int value

getFirst()

public OutlineItemCollection getFirst()

Gets an outline item representing the first top-level item in the outline.

Returns: OutlineItemCollection - OutlineItemCollection object

getLast()

public OutlineItemCollection getLast()

Gets an outline item representing the last top-level item in the outline.

Returns: OutlineItemCollection - OutlineItemCollection object

isSynchronized()

public boolean isSynchronized()

Gets a value indicating whether access to this collection is synchronized (thread safe).

Returns: boolean - boolean value

getSyncRoot()

public Object getSyncRoot()

Gets an object that can be used to synchronize access to this collection.

Returns: java.lang.Object - Object for synchronization

isReadOnly()

public boolean isReadOnly()

Gets a value indicating whether the collection is read-only.

Returns: boolean - boolean value

add(OutlineItemCollection outline)

public void add(OutlineItemCollection outline)

Adds outline item to collection.

Parameters:

ParameterTypeDescription
outlineOutlineItemCollectionThe outline item to be added.

delete()

public void delete()

Deletes all outline items from the document outline.

delete(String name)

public void delete(String name)

Deletes the outline item with specified title from the document outline.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe title of outline item to be deleted

copyTo(OutlineItemCollection[] array, int index)

public void copyTo(OutlineItemCollection[] array, int index)

Copies the outline items to an System.Array, starting at a particular System.Array index.

Parameters:

ParameterTypeDescription
arrayOutlineItemCollection[]The one-dimensional System.Array that is the destination. Must have zero-based indexing.
indexintThe zero-based index in array at which copying begins.

iterator()

public Iterator<OutlineItemCollection> iterator()

Returns an enumerator that iterates through the collection.

Returns: java.util.Iterator<com.aspose.pdf.OutlineItemCollection> - An System.Collections.IEnumerator object that can be used to iterate through the collection.

clear()

public void clear()

Clears all items from the collection.

contains(OutlineItemCollection item)

public boolean contains(OutlineItemCollection item)

Not supported yet.

Checks does collection contains given item.

Parameters:

ParameterTypeDescription
itemOutlineItemCollectionThe object to locate in the collection

Returns: boolean - boolean value True - if item found; otherwise, false.

remove(OutlineItemCollection item)

public boolean remove(OutlineItemCollection item)

Not supported yet.

Always throws exception

Parameters:

ParameterTypeDescription
itemOutlineItemCollectionThe object to locate in the collection

Returns: boolean - boolean value True - if item removed; otherwise, false.

remove(int index)

public final void remove(int index)

Remove item by index.

Parameters:

ParameterTypeDescription
indexintIndex of the item to be removed.

get_Item(int index)

public OutlineItemCollection get_Item(int index)

Gets outline item from collection by index.

Parameters:

ParameterTypeDescription
indexintIndex of requested item.

Returns: OutlineItemCollection - OutlineItemCollection object