CommentCollection

CommentCollection

Overview

CommentCollection is a class in Aspose.Slides FOSS for Java. Inherits from: ICommentCollection.

Represents a collection of comments of one author.

Properties

NameTypeAccessDescription
authorObjICommentAuthorReadResolves the owning {@link ICommentAuthor} object from the backing author data.
allCommentsPartsList<CommentsPartEntry>ReadReturns all {@link CommentsPart} instances across all slides that contain
comments by this author.

Methods

SignatureDescription
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)ISlideReturns the {@link ISlide} whose part name matches the given part name, or {@code null}.
getAuthorObj()ICommentAuthorResolves 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)CommentsPartGets or creates the {@link CommentsPart} for the given slide part name.
buildComment(data: CommentData, cp: CommentsPart, slideObj: ISlide)CommentBuilds 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)ICommentAdds a new comment with text, slide, position, and creation time, returning IComment
insertComment(index: int, text: String, slide: ISlide, position: PointF, createdTime: LocalDateTime)ICommentInserts 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)ICommentReturns the IComment at the given index
size()intReturns 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

See Also