MasterSlideCollection

Inheritance: java.lang.Object, com.aspose.slides.DomObject

All Implemented Interfaces: com.aspose.slides.IMasterSlideCollection

public final class MasterSlideCollection extends DomObject<Presentation> implements IMasterSlideCollection

Represents a collection of master slides.

Methods

Method Description
size() Gets the number of elements actually contained in the collection.
get_Item(int index) Gets the element at the specified index.
remove(IMasterSlide value) Removes the first occurrence of a specific object from the collection.
removeAt(int index) Removes the element at the specified index of the collection.
removeUnused(boolean ignorePreserveField) Removes unused master slides.
addClone(IMasterSlide sourceMaster) Adds a copy of a specified master slide to the end of the collection.
insertClone(int index, IMasterSlide sourceMaster) Inserts a copy of a specified master slide to specified position of the collection.
copyTo(System.Array array, int index) Copies all elements from the collection to the specified array.
isSynchronized() Returns a value indicating whether access to the collection is synchronized (thread-safe).
getSyncRoot() Returns a synchronization root.
iterator() Returns an enumerator that iterates through the collection.
iteratorJava() Returns a java iterator for the entire collection.

size()

public final int size()

Gets the number of elements actually contained in the collection. Read-only int.

Returns: int

get_Item(int index)

public final IMasterSlide get_Item(int index)

Gets the element at the specified index. Read-only MasterSlide.

Parameters:

Parameter Type Description
index int

Returns: IMasterSlide

remove(IMasterSlide value)

public final void remove(IMasterSlide value)

Removes the first occurrence of a specific object from the collection.

Parameters:

Parameter Type Description
value IMasterSlide The master slide to remove from the collection.

removeAt(int index)

public final void removeAt(int index)

Removes the element at the specified index of the collection.

Parameters:

Parameter Type Description
index int The zero-based index of the element to remove.

To avoid throwing of the PptxEditException check master’s HasDependingSlides property before. |

removeUnused(boolean ignorePreserveField)

public final void removeUnused(boolean ignorePreserveField)

Removes unused master slides.

Parameters:

Parameter Type Description
ignorePreserveField boolean Determines, whether this method should remove unused master even if its (MasterSlide#getPreserve/MasterSlide#setPreserve(boolean)) property is set to true.

addClone(IMasterSlide sourceMaster)

public final IMasterSlide addClone(IMasterSlide sourceMaster)

Adds a copy of a specified master slide to the end of the collection. Linked layout slides will be copied too.

Parameters:

Parameter Type Description
sourceMaster IMasterSlide Slide to clone.

Returns: IMasterSlide - Added slide.

insertClone(int index, IMasterSlide sourceMaster)

public final IMasterSlide insertClone(int index, IMasterSlide sourceMaster)

Inserts a copy of a specified master slide to specified position of the collection. Linked layout slides will be copied too.

Parameters:

Parameter Type Description
index int Index of new slide.
sourceMaster IMasterSlide Slide to clone.

Returns: IMasterSlide - Inserted master slide.

copyTo(System.Array array, int index)

public final void copyTo(System.Array array, int index)

Copies all elements from the collection to the specified array.

Parameters:

Parameter Type Description
array com.aspose.ms.System.Array Target array.
index int Starting index in the target array.

isSynchronized()

public final boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.

Returns: boolean

getSyncRoot()

public final Object getSyncRoot()

Returns a synchronization root. Read-only Object.

Returns: java.lang.Object

iterator()

public final System.Collections.Generic.IGenericEnumerator<IMasterSlide> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IMasterSlide> - A IGenericEnumerator that can be used to iterate through the collection.

iteratorJava()

public final System.Collections.Generic.IGenericEnumerator<IMasterSlide> iteratorJava()

Returns a java iterator for the entire collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IMasterSlide> - An java.util.Iterator for the entire collection.