com.spire.doc.collections
Class ParagraphCollection

java.lang.Object
  extended by com.spire.doc.OwnerHolder
      extended by com.spire.doc.collections.DocumentSubsetCollection
          extended by 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 objects.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.spire.doc.collections.DocumentSubsetCollection
DocumentSubsetCollection.SubSetEnumerator
 
Constructor Summary
ParagraphCollection(BodyRegionCollection bodyItems)
          Initializes a new instance of the class.
 
Method Summary
 int add(IParagraph paragraph)
          Adds a paragraph to end of text body.
 boolean contains(IParagraph paragraph)
          Determines whether the contains a specific value.
 Paragraph get(int index)
          Gets the at the specified index.
 int indexOf(IParagraph paragraph)
          Returns the zero-based index of the specified paragraph.
 void insert(int index, IParagraph paragraph)
          Inserts a paragraph into collection at the specified index.
 void remove(IParagraph paragraph)
          Removes the specified paragraph.
 void removeAt(int index)
          Removes the paragraph at the specified index from the collection.
 
Methods inherited from class com.spire.doc.collections.DocumentSubsetCollection
clear, getCount, getDocument, getOwner, iterator
 
Methods inherited from interface com.spire.doc.interfaces.ICollectionBase
getCount
 

Constructor Detail

ParagraphCollection

public ParagraphCollection(BodyRegionCollection bodyItems)
Initializes a new instance of the class.

Parameters:
bodyItems - The body items.
Method Detail

get

public Paragraph get(int index)
Gets the at the specified index.

Specified by:
get in interface IParagraphCollection
Overrides:
get in class DocumentSubsetCollection
Parameters:
index -
Returns:

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:

contains

public boolean contains(IParagraph paragraph)
Determines whether the contains a specific value.

Parameters:
paragraph - The paragraph. If paragraph is found, set to true.
Returns:

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:

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.