AnnotationCollection

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

All Implemented Interfaces: Iterable < Annotation >

public final class AnnotationCollection extends Object implements Iterable < Annotation >

Class representing annotation collection.

Constructors

ConstructorDescription
AnnotationCollectionConstructor of AnnotationCollection. Creates annotation collection for annotations on the given page.

Methods

MethodDescription
acceptAccepts visitor to process annotation.
addAdds annotation to the collection.
addAdds annotation to the collection. If page is rotated then annotation rectangle will be recalculated accordingly.
clearDeletes all annotations from the collection.
containsChecks if specified annotation belong to collection.
copyToCopies array of annotations into collection.
deleteDeletes all annotations from the collection.
deleteDeletes all annotations from the collection.
deleteDeletes annotation from the collection by index.
findByNameReturns annotation by its name.
get_ItemThe index of the element to get.
getSyncRootGets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection.
isReadOnlyGets a value indicating if collection is readonly.
isSynchronizedGets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe).
iteratorReturns collection enumerator.
removeDeletes specified annotation from the collection.
sizeGets count of annotations in collection.

AnnotationCollection

Constructor of AnnotationCollection. Creates annotation collection for annotations on the given page.

accept

Accepts visitor to process annotation.

add

Adds annotation to the collection.

add

Adds annotation to the collection. If page is rotated then annotation rectangle will be recalculated accordingly.

clear

public void clear()

Deletes all annotations from the collection.

contains

Checks if specified annotation belong to collection.

copyTo

Copies array of annotations into collection.

delete

public void delete()

Deletes all annotations from the collection.

delete

Deletes all annotations from the collection.

delete

public void delete(int index)

Deletes annotation from the collection by index.

Parameters:

ParameterTypeDescription
indexIndex of annotation which shall be deleted.

findByName

Returns annotation by its name.

get_Item

public Annotation get_Item(int index)

The index of the element to get.

Parameters:

ParameterTypeDescription
indexThe index value started from one.

Returns: Annotation object

getSyncRoot

public Object getSyncRoot()

Gets an object that can be used to synchronize access to com.aspose.pdf.AnnotationCollection.

Returns: Object for sinchronization

isReadOnly

public boolean isReadOnly()

Gets a value indicating if collection is readonly.

Returns: boolean value

isSynchronized

public boolean isSynchronized()

Gets a value indicating whether access to the com.aspose.pdf.AnnotationCollection is synchronized (thread safe).

Returns: boolean value

iterator

public com.aspose.ms.System.Collections.IEnumerator< Annotation > iterator()

Returns collection enumerator.

Returns: Enumerator object

remove

Deletes specified annotation from the collection.

size

public int size()

Gets count of annotations in collection.

Returns: int value