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

# GradientStopCollection

## Overview

`GradientStopCollection` is a class in Aspose.Slides FOSS for Java.
Inherits from: `IGradientStopCollection`, `Iterable`.

Represents a collection of gradient stops.

This class provides 14 methods for working with GradientStopCollection objects in Java programs.
Available methods include: `GradientStopCollection`, `add`, `asICollection`, `asIEnumerable`, `clear`, `get`, `insert`, `iterator`, `removeAt`, `size`.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.

## Methods

| Signature | Description |
|-----------|-------------|
| `GradientStopCollection(gsLst: Element, saveCallback: Runnable)` | Creates a new GradientStopCollection backed by the given {@code } element. |
| `get(index: int)` → `IGradientStop` | Returns the gradient stop at the specified zero‑based index |
| `size()` → `int` | Returns the number of gradient stops in the collection |
| `add(position: double, color: Color)` → `IGradientStop` | Adds a new gradient stop with the given position and solid color, returning the created stop |
| `add(position: double, presetColor: PresetColor)` → `IGradientStop` |  |
| `add(position: double, schemeColor: SchemeColor)` → `IGradientStop` |  |
| `insert(index: int, position: double, color: Color)` | Inserts a gradient stop with the given position and color at the specified index |
| `insert(index: int, position: double, presetColor: PresetColor)` |  |
| `insert(index: int, position: double, schemeColor: SchemeColor)` |  |
| `removeAt(index: int)` | Removes the gradient stop at the specified index |
| `clear()` | Removes all gradient stops from the collection |
| `asICollection()` → `List` | Returns the gradient stops as a List |
| `asIEnumerable()` → `Iterable` | Returns the gradient stops as an Iterable |
| `iterator()` → `Iterator` | Returns an iterator over the gradient stops in this collection. |

## See Also

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