CommentCollection
Overview
CommentCollection is a class in Aspose.Slides FOSS for Java.
Inherits from: ICommentCollection.
Represents a collection of comments of one author.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
authorObj | ICommentAuthor | Read | Resolves the owning {@link ICommentAuthor} object from the backing author data. |
allCommentsParts | List<CommentsPartEntry> | Read | Returns all {@link CommentsPart} instances across all slides that contain |
| comments by this author. |
Methods
| Signature | Description |
|---|---|
CommentCollection(author: ICommentAuthor) | Creates a comment collection for the given author. |
initInternal(authorData: AuthorData, authorsPart: CommentAuthorsPart, pkg: OpcPackage, presentation: Presentation) | Initializes this collection with package-level backing data. |
resolveSlide(partName: String) → ISlide | Returns the {@link ISlide} whose part name matches the given part name, or {@code null}. |
getAuthorObj() → ICommentAuthor | Resolves the owning {@link ICommentAuthor} object from the backing author data. |
getAllCommentsParts() → List<CommentsPartEntry> | Returns all {@link CommentsPart} instances across all slides that contain |
| comments by this author. | |
getOrCreateCommentsPart(slidePartName: String) → CommentsPart | Gets or creates the {@link CommentsPart} for the given slide part name. |
buildComment(data: CommentData, cp: CommentsPart, slideObj: ISlide) → Comment | Builds a {@link Comment} from raw comment data, a comments part, and an optional slide. |
collectMyComments() → List<MyCommentEntry> | Collects all comments by this author across all slides in the package. |
addComment(text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime) → IComment | Adds a new comment with text, slide, position, and creation time, returning IComment |
insertComment(index: int, text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime) → IComment | Inserts a comment at the given index with specified details, returning IComment |
removeAt(index: int) | Removes the comment at the specified index |
remove(comment: IComment) | Deletes the specified IComment from the collection |
clear() | Removes all comments from the collection |
get(index: int) → IComment | Returns the IComment at the given index |
size() → int | Returns the number of comments in the collection |
toArray() → IComment[] | Returns a sub‑array of comments starting at startIndex with count elements |
toArray(startIndex: int, count: int) → IComment[] | |
asICollection() → List<IComment> | Returns the comments as a List |
asIEnumerable() → Iterable<IComment> | Returns the comments as an Iterable |
findCommentByIdx(idx: int) → Optional<IComment> | Returns an Optional containing the comment at the given index, if present |