paragraphcollection-ag凯发旗舰厅
com.spire.doc.collections
class paragraphcollection
java.lang.object
com.spire.doc.collections.documentsubsetcollection
com.spire.doc.collections.paragraphcollection
- all implemented interfaces:
- icollectionbase, idocumentobjectcollection, iparagraphcollection, java.lang.iterable
public class paragraphcollection
- extends documentsubsetcollection
- implements iparagraphcollection
represents a collection of iparagraph
objects.
paragraphcollection
public paragraphcollection(bodyregioncollection bodyitems)
- initializes a new instance of the paragraphcollection class.
- parameters:
bodyitems
- the body items.
get
public paragraph get(int index)
- gets the
iparagraph
at the specified index.
- specified by:
get
in interface idocumentobjectcollection
- specified by:
get
in interface iparagraphcollection
- overrides:
get
in class documentsubsetcollection
- parameters:
index
- index
- returns:
- paragraph object
add
public int add(iparagraph paragraph)
- adds a paragraph to end of text body.
- specified by:
add
in interface iparagraphcollection
- parameters:
paragraph
- the paragraph.
- returns:
- int
contains
public boolean contains(iparagraph paragraph)
- determines whether the
iparagraphcollection
contains a specific value.
- parameters:
paragraph
- the paragraph.
- returns:
- if paragraph is found, set to true.
insert
public void insert(int index,
iparagraph paragraph)
- inserts a paragraph into collection at the specified index.
- specified by:
insert
in interface iparagraphcollection
- parameters:
index
- the index.paragraph
- the paragraph.
indexof
public int indexof(iparagraph paragraph)
- returns the zero-based index of the specified paragraph.
- specified by:
indexof
in interface iparagraphcollection
- parameters:
paragraph
- the paragraph.
- returns:
- int
remove
public void remove(iparagraph paragraph)
- removes the specified paragraph.
- parameters:
paragraph
- the paragraph.
removeat
public void removeat(int index)
- removes the paragraph at the specified index from the collection.
- specified by:
removeat
in interface iparagraphcollection
- parameters:
index
- the index.