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

# IPortionCollection

## Overview

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

Represents a collection of text portions.

This interface provides 12 methods for working with IPortionCollection objects in Java programs.
Available methods include: `add`, `asIEnumerable`, `clear`, `contains`, `count`, `get`, `indexOf`, `insert`, `isReadOnly`, `remove`, `removeAt`, `size`.
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)` → `IPortion` | Gets the portion at the specified index. |
| `size()` → `int` | Returns the number of portions in the collection. |
| `count()` → `int` | Gets the number of elements actually contained in the collection. |
| `asIEnumerable()` → `Iterable` | Returns this collection as an iterable. |
| `add(value: IPortion)` | Adds a portion to the end of the collection. |
| `indexOf(item: IPortion)` → `int` | Returns the index of the specified portion. |
| `insert(index: int, value: IPortion)` | Inserts a portion at the specified index. |
| `clear()` | Removes all portions from the collection. |
| `contains(item: IPortion)` → `boolean` | Determines whether the collection contains the specified portion. |
| `remove(item: IPortion)` → `boolean` | Removes the first occurrence of the specified portion. |
| `removeAt(index: int)` | Removes the portion at the specified index. |
| `isReadOnly()` → `boolean` | Gets a value indicating whether the collection is read-only. |

## See Also

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