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

# ICommentCollection

## Overview

`ICommentCollection` is a interface in Aspose.Slides FOSS for Java.

Represents a collection of comments belonging to a single author.

This interface provides 12 methods for working with ICommentCollection objects in Java programs.
Available methods include: `addComment`, `asICollection`, `asIEnumerable`, `clear`, `findCommentByIdx`, `get`, `insertComment`, `remove`, `removeAt`, `size`, `toArray`.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.

## Methods

| Signature | Description |
|-----------|-------------|
| `addComment(text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime)` → `IComment` | Adds a comment to the collection. |
| `insertComment(index: int, text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime)` → `IComment` | Inserts a comment at the given index. |
| `removeAt(index: int)` | Removes the comment at the given index. |
| `remove(comment: IComment)` | Removes the given comment (and its replies) from the collection. |
| `clear()` | Removes all comments from this collection. |
| `get(index: int)` → `IComment` | Returns the comment at the given index. |
| `size()` → `int` | Returns the number of comments. |
| `toArray()` → `IComment[]` | Returns all comments as an array. |
| `toArray(startIndex: int, count: int)` → `IComment[]` | Returns a subset of comments as an array. |
| `asICollection()` → `List` | Returns this collection as a list. |
| `asIEnumerable()` → `Iterable` | Returns this collection as an iterable. |
| `findCommentByIdx(idx: int)` → `Optional` | Finds a comment by its unique index (per author). |

## See Also

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