---
Product: Aspose.Slides
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/java/IParagraphCollection
---

# IParagraphCollection

## Overview

`IParagraphCollection` is a interface in Aspose.Slides FOSS for Java.
Inherits from: `Iterable`.

Represents a collection of paragraphs.

This interface provides 14 methods for working with IParagraphCollection objects in Java programs.
Available methods include: `add`, `asIEnumerable`, `asIPresentationComponent`, `asISlideComponent`, `clear`, `contains`, `count`, `get`, `indexOf`, `insert`, `isReadOnly`, `remove`, and 2 additional methods.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `readOnly`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `readOnly` | `boolean` | Read | Gets a value indicating whether the collection is read-only. |

## Methods

| Signature | Description |
|-----------|-------------|
| `get(index: int)` → `IParagraph` | Gets the paragraph at the specified index. |
| `size()` → `int` | Returns the number of paragraphs in the collection. |
| `count()` → `int` | Gets the number of elements actually contained in the collection. |
| `asISlideComponent()` → `ISlideComponent` | Returns the base {@link ISlideComponent} interface. |
| `asIEnumerable()` → `Iterable` | Returns this collection as an iterable. |
| `add(value: IParagraph)` | Adds a paragraph to the end of the collection. |
| `insert(index: int, value: IParagraph)` | Inserts a paragraph at the specified index. |
| `clear()` | Removes all paragraphs from the collection. |
| `removeAt(index: int)` | Removes the paragraph at the specified index. |
| `remove(item: IParagraph)` → `boolean` | Removes the first occurrence of the specified paragraph. |
| `isReadOnly()` → `boolean` | Gets a value indicating whether the collection is read-only. |
| `contains(item: IParagraph)` → `boolean` | Determines whether the collection contains the specified paragraph. |
| `indexOf(item: IParagraph)` → `int` | Returns the zero-based index of the first occurrence of the specified paragraph. |
| `asIPresentationComponent()` → `IPresentationComponent` | Returns this instance as {@link IPresentationComponent}. |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)