
**Inheritance:**
java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, com.aspose.tasks.AbstractList
```
public class VbaModuleCollection extends AbstractList<VbaModule>
```

Represents a collection of [VbaModule](../../com.aspose.tasks/vbamodule) objects.
## Methods

| Method | Description |
| --- | --- |
| [addItem(VbaModule item)](#addItem-com.aspose.tasks.VbaModule-) | Add the specified module to this collection. |
| [clear()](#clear--) | \{@inheritDoc\} |
| [contains(VbaModule item)](#contains-com.aspose.tasks.VbaModule-) | Checks if collection contains specified item. |
| [get(int index)](#get-int-) | Gets the module at the specified index. |
| [get(String moduleName)](#get-java.lang.String-) | Gets the module with the specified name. |
| [isReadOnly()](#isReadOnly--) | Gets a value indicating whether this collection is read only. |
| [iterator()](#iterator--) | Returns an enumerator for this collection. |
| [remove(VbaModule item)](#remove-com.aspose.tasks.VbaModule-) | Removes newly added module from the collection. |
| [removeItem(VbaModule item)](#removeItem-com.aspose.tasks.VbaModule-) | Removes module from the collection. |
| [size()](#size--) | Gets the number of modules contained in the collection. |
| [toList()](#toList--) | Converts the collection object to a list of [VbaModule](../../com.aspose.tasks/vbamodule) objects. |
### addItem(VbaModule item) {#addItem-com.aspose.tasks.VbaModule-}
```
public final void addItem(VbaModule item)
```


Add the specified module to this collection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [VbaModule](../../com.aspose.tasks/vbamodule) | the specified module which should be added to this collection. |

### clear() {#clear--}
```
public final void clear()
```




### contains(VbaModule item) {#contains-com.aspose.tasks.VbaModule-}
```
public final boolean contains(VbaModule item)
```


Checks if collection contains specified item.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [VbaModule](../../com.aspose.tasks/vbamodule) | The item to check. |

**Returns:**
boolean - true, if collection contains an item, false otherwise.
### get(int index) {#get-int-}
```
public final VbaModule get(int index)
```


Gets the module at the specified index.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| index | int | \{@inheritDoc\} |

**Returns:**
[VbaModule](../../com.aspose.tasks/vbamodule) - \{@inheritDoc\}
### get(String moduleName) {#get-java.lang.String-}
```
public final VbaModule get(String moduleName)
```


Gets the module with the specified name.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| moduleName | java.lang.String | The name of the module to get. |

**Returns:**
[VbaModule](../../com.aspose.tasks/vbamodule) - the module instance
### isReadOnly() {#isReadOnly--}
```
public final boolean isReadOnly()
```


Gets a value indicating whether this collection is read only.

**Returns:**
boolean - a value indicating whether this collection is read only.
### iterator() {#iterator--}
```
public final Iterator<VbaModule> iterator()
```


Returns an enumerator for this collection.

**Returns:**
java.util.Iterator&lt;com.aspose.tasks.VbaModule&gt; - an enumerator for this collection.
### remove(VbaModule item) {#remove-com.aspose.tasks.VbaModule-}
```
public final boolean remove(VbaModule item)
```


Removes newly added module from the collection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [VbaModule](../../com.aspose.tasks/vbamodule) | the module to be removed |

**Returns:**
boolean - a value indicating whether the module was removed
### removeItem(VbaModule item) {#removeItem-com.aspose.tasks.VbaModule-}
```
public final void removeItem(VbaModule item)
```


Removes module from the collection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [VbaModule](../../com.aspose.tasks/vbamodule) | the module to be removed |

### size() {#size--}
```
public final int size()
```


Gets the number of modules contained in the collection.

**Returns:**
int - the number of modules contained in the collection.
### toList() {#toList--}
```
public final List<VbaModule> toList()
```


Converts the collection object to a list of [VbaModule](../../com.aspose.tasks/vbamodule) objects.

**Returns:**
java.util.List&lt;com.aspose.tasks.VbaModule&gt; - List of objects.
