VbaModuleCollection

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.IVbaModuleCollection

public final class VbaModuleCollection implements IVbaModuleCollection

Represents a collection of a VBA Project modules.

Methods

MethodDescription
size()Gets the number of elements actually contained in the collection.
remove(IVbaModule value)Removes the first occurrence of a specific object from the collection.
addEmptyModule(String name)Adds a new empty module to the VBA Project.
get_Item(int index)Gets the element at the specified index.
iterator()Returns an enumerator that iterates through the collection.
iteratorJava()Returns a java iterator for the entire 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.

size()

public final int size()

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

Returns: int

remove(IVbaModule value)

public final void remove(IVbaModule value)

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

Parameters:

ParameterTypeDescription
valueIVbaModuleThe module to remove from the collection.

addEmptyModule(String name)

public final IVbaModule addEmptyModule(String name)

Adds a new empty module to the VBA Project.

Parameters:

ParameterTypeDescription
namejava.lang.StringName of the module

Returns: IVbaModule - Added module.

get_Item(int index)

public final IVbaModule get_Item(int index)

Gets the element at the specified index.

Parameters:

ParameterTypeDescription
indexint

Returns: IVbaModule

iterator()

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

Returns an enumerator that iterates through the collection.

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

iteratorJava()

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

Returns a java iterator for the entire collection.

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

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:

ParameterTypeDescription
arraycom.aspose.ms.System.ArrayTarget array.
indexintStarting 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