pdfannotationcollection-ag凯发旗舰厅



com.spire.pdf.annotations
class pdfannotationcollection

java.lang.object
  extended by com.spire.pdf.pdfcollection
      extended by com.spire.pdf.annotations.pdfannotationcollection
all implemented interfaces:
com.spire.ms.system.collections.ienumerable, ipdfwrapper, java.lang.iterable

public class pdfannotationcollection
extends pdfcollection
implements ipdfwrapper

represents collection of objects.


constructor summary
pdfannotationcollection()
          initializes a new instance of the class.
pdfannotationcollection(pdfnewpage page)
          creates new annotation collection for the specified page.
 
method summary
 int add(pdfannotation annotation)
          adds a new annotation to collection.
 void clear()
          cleares the collection.
 boolean contains(pdfannotation annotation)
          searches the collection for the specified annotation.
 pdfannotation get(int index)
          gets the object at the specified position.
  getannotations()
          gets the annotations array.
 int indexof(pdfannotation annotation)
          searches the collection for the specified annotation.
 void remove(pdfannotation annot)
          removes the element from the collection.
 void removeat(int index)
          removes the element at the specified field.
 
methods inherited from class com.spire.pdf.pdfcollection
getcount, getlist
 
constructor detail

pdfannotationcollection

public pdfannotationcollection()
initializes a new instance of the class.

pdfannotationcollection

public pdfannotationcollection(pdfnewpage page)
creates new annotation collection for the specified page.
parameters:
page - page which collection is created for.
method detail

get

public pdfannotation get(int index)
gets the object at the specified position.
parameters:
index - the index value of the annotation in the collection.
returns:
annotation object at the specified position.

getannotations

public  getannotations()
gets the annotations array.
returns:
the annotations.

add

public int add(pdfannotation annotation)
adds a new annotation to collection.
parameters:
annotation - the new annotation to be added to collection.
returns:
position of the annotation in collection.

clear

public void clear()
cleares the collection.

contains

public boolean contains(pdfannotation annotation)
searches the collection for the specified annotation.
parameters:
annotation - the annotation to search for.
returns:
true, if annotation is contained in collection. otherwise - false.

indexof

public int indexof(pdfannotation annotation)
searches the collection for the specified annotation.
parameters:
annotation - the annotation to search.
returns:
index of the element in the collection, if exists, or -1 if the element does not exist in the collection.

removeat

public void removeat(int index)
removes the element at the specified field.
parameters:
index - the index of the element to remove.

remove

public void remove(pdfannotation annot)
removes the element from the collection.
parameters:
annot - the element to remove.


网站地图