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

# CellCollection

## Overview

`CellCollection` is a class in Aspose.Slides FOSS for Java.
Inherits from: `BaseCollection`, `ICellCollection`.

Represents a collection of cells.

This class provides 16 methods for working with CellCollection objects in Java programs.
Available methods include: `CellCollection`, `asICollection`, `asIEnumerable`, `asIPresentationComponent`, `asISlideComponent`, `asList`, `get`, `getPresentation`, `getSlide`, `getSlidePart`, `initInternal`, `iterator`, and 2 additional methods.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `presentation`, `slide`, `slidePart`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `slide` | `IBaseSlide` | Read | Gets the slide. |
| `slidePart` | `Object` | Read | Returns the slide part associated with this collection. |
| `presentation` | `IPresentation` | Read | Gets the presentation. |

## Methods

| Signature | Description |
|-----------|-------------|
| `CellCollection()` | Creates an empty CellCollection. |
| `CellCollection(cells: List)` | Creates a new CellCollection with the given cells. |
| `CellCollection(cells: List, parentSlide: IBaseSlide)` | Creates a new CellCollection with the given cells and parent slide. |
| `initInternal(cells: List, slidePart: Object, parentSlide: IBaseSlide)` → `CellCollection` | Initializes this collection with the given cells, slide part, and parent slide. |
| `get(index: int)` → `ICell` | Returns the ICell at the specified index |
| `size()` → `int` | Returns the number of cells in the collection |
| `asList()` → `List` | Returns an unmodifiable view of the internal cell list. |
| `asICollection()` → `List` | Returns the cells as a generic collection |
| `asIEnumerable()` → `Iterable` | Returns an iterable over the cells |
| `getSlide()` → `IBaseSlide` | Returns the slide. |
| `setParentSlide(parentSlide: IBaseSlide)` | Sets the parent slide for this collection. |
| `getSlidePart()` → `Object` | Returns the slide part associated with this collection. |
| `getPresentation()` → `IPresentation` | Returns the presentation. |
| `asISlideComponent()` → `ISlideComponent` | Returns this collection as an ISlideComponent |
| `asIPresentationComponent()` → `IPresentationComponent` | Returns this collection as an IPresentationComponent |
| `iterator()` → `Iterator` | Returns an iterator over the cells in the collection |

## See Also

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