com.aspose.cells

Class CommentCollection

  • All Implemented Interfaces:
    java.lang.Iterable
    public class CommentCollection 
    extends CollectionBase

Encapsulates a collection of Comment objects.

Example:

Workbook workbook = new Workbook();

CommentCollection comments = workbook.getWorksheets().get(0).getComments();

Property Getters/Setters Summary
intgetCount()
Commentget(intindex)
Gets the Comment element at the specified index.
Commentget(introw, intcolumn)
Gets the Comment element at the specified row index and column index.
Commentget(java.lang.StringcellName)
Gets the Comment element at the specified cell.
 
Method Summary
intadd(introw, intcolumn)
Adds a comment to the collection.
intadd(java.lang.Objectvalue)
Reserved for internal use.
intadd(java.lang.StringcellName)
Adds a comment to the collection.
voidclear()
Removes all comments;
booleancontains(java.lang.Objectvalue)
Reserved for internal use.
java.lang.Objectget(intindex)
Reserved for internal use.
intindexOf(java.lang.Objectvalue)
Reserved for internal use.
java.util.Iteratoriterator()
voidremoveAt(intindex)
voidremoveAt(introw, intcolumn)
Removes the comment of the specific cell.
voidremoveAt(java.lang.StringcellName)
Removes the comment of the specific cell.
 

    • Property Getters/Setters Detail

      • getCount

        public int getCount()
        
      • get

        public Comment get(int index)
        
        Gets the Comment element at the specified index.
        Parameters:
        index - The zero based index of the element.
        Returns:
        The element at the specified index.
      • get

        public Comment get(java.lang.String cellName)
        
        Gets the Comment element at the specified cell.
        Parameters:
        cellName - Cell name.
        Returns:
        The element at the specified cell.
      • get

        public Comment get(int row, int column)
        
        Gets the Comment element at the specified row index and column index.
        Parameters:
        row - Row index.
        column - Column index.
        Returns:
        The element at the specified cell.
    • Method Detail

      • add

        public int add(int row, int column)
        Adds a comment to the collection.
        Parameters:
        row - Cell row index.
        column - Cell column index.
        Returns:
        Comment object index.
      • add

        public int add(java.lang.String cellName)
        Adds a comment to the collection.
        Parameters:
        cellName - Cell name.
        Returns:
        Comment object index.
      • removeAt

        public void removeAt(java.lang.String cellName)
        Removes the comment of the specific cell.
        Parameters:
        cellName - The name of cell which contains a comment.
      • removeAt

        public void removeAt(int row, int column)
        Removes the comment of the specific cell.
        Parameters:
        row - The row index.
        column - the column index.
      • clear

        public void clear()
        Removes all comments;
      • removeAt

        public void removeAt(int index)
      • iterator

        public java.util.Iterator iterator()
      • get

        public java.lang.Object get(int index)
        Reserved for internal use.
      • contains

        public boolean contains(java.lang.Object value)
        Reserved for internal use.
      • add

        public int add(java.lang.Object value)
        Reserved for internal use.
      • indexOf

        public int indexOf(java.lang.Object value)
        Reserved for internal use.