OleObjectCollection

Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, com.aspose.tasks.AbstractList

public final class OleObjectCollection extends AbstractList<OleObject>

Represents a collection containing the instances of the OleObject class.

Methods

MethodDescription
add(OleObject item){@inheritDoc}
clear()Clears the collection.
get(int index)(@inheritDoc}
size()Returns the number of elements in this collection.
toList()Converts the instance of the OleObjectCollection class to a list containing the instances of the OleObject class.

add(OleObject item)

public boolean add(OleObject item)

Parameters:

ParameterTypeDescription
itemOleObject{@inheritDoc}

Returns: boolean - {@inheritDoc}

clear()

public final void clear()

Clears the collection. In order to persist these changes project.Save should be called with new MPPSaveOptions { WriteViewData = true; }


> ``` > How to clear OLE objects and persist these changes. > ``````

[C#] project.OleObjects.Clear(); project.Save(“output.mpp”, new MPPSaveOptions {WriteViewData = true;} )




### get(int index) {#get-int-}

public OleObject get(int index)



(@inheritDoc\}

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

**Returns:**
[OleObject](../../com.aspose.tasks/oleobject) - \{@inheritDoc\}
### size() {#size--}

public int size()



Returns the number of elements in this collection.

**Returns:**
int - the number of elements in this collection.
### toList() {#toList--}

public final List toList()



Converts the instance of the [OleObjectCollection](../../com.aspose.tasks/oleobjectcollection) class to a list containing the instances of the [OleObject](../../com.aspose.tasks/oleobject) class.

**Returns:**
java.util.List&lt;com.aspose.tasks.OleObject&gt; - Converted to list the instance of the [OleObjectCollection](../../com.aspose.tasks/oleobjectcollection) class containing the instances of the [OleObject](../../com.aspose.tasks/oleobject) class.