
**Inheritance:**
java.lang.Object, com.aspose.ms.System.Collections.ObjectModel.Collection, [com.aspose.email.ImapMessageInfoCollectionBase](../../com.aspose.email/imapmessageinfocollectionbase)

**All Implemented Interfaces:**
com.aspose.ms.System.Collections.Generic.IGenericList, com.aspose.ms.System.Collections.Generic.IGenericCollection, com.aspose.ms.System.Collections.Generic.IGenericEnumerable
```
public final class ImapMessageInfoCollection extends ImapMessageInfoCollectionBase implements System.Collections.Generic.IGenericList<ImapMessageInfo>, System.Collections.Generic.IGenericCollection<ImapMessageInfo>, System.Collections.Generic.IGenericEnumerable<ImapMessageInfo>
```

Provides a container for a collection of [ImapMessageInfo](../../com.aspose.email/imapmessageinfo) objects
## Constructors

| Constructor | Description |
| --- | --- |
| [ImapMessageInfoCollection()](#ImapMessageInfoCollection--) | Initializes a new instance of the ImapMessageCollection class. |
| [ImapMessageInfoCollection(Iterable<ImapMessageInfo> messageInfoEn)](#ImapMessageInfoCollection-java.lang.Iterable-com.aspose.email.ImapMessageInfo--) | Initializes a new instance of the ImapMessageCollection class |
## Methods

| Method | Description |
| --- | --- |
| [add(ImapMessageInfo item)](#add-com.aspose.email.ImapMessageInfo-) | Adds the ImapMessageInfo to the ImapMessageCollection. |
| [addItem(T arg0)](#addItem-T-) |  |
| [addRange(Iterable<ImapMessageInfo> messageInfos)](#addRange-java.lang.Iterable-com.aspose.email.ImapMessageInfo--) | Adds the enumeration of ImapMessageInfo objects to the end of the collection |
| [clear()](#clear--) |  |
| [containsItem(T arg0)](#containsItem-T-) |  |
| [copyToTArray(T[] arg0, int arg1)](#copyToTArray-T---int-) |  |
| [equals(Object arg0)](#equals-java.lang.Object-) |  |
| [getClass()](#getClass--) |  |
| [getExceptions()](#getExceptions--) | Gets collection of exceptions, that occurred during message processing. |
| [getICollection()](#getICollection--) |  |
| [getIList()](#getIList--) |  |
| [getSyncRoot()](#getSyncRoot--) | Gets an object that can be used to synchronize access to the collection. |
| [get_Item(int arg0)](#get-Item-int-) |  |
| [hashCode()](#hashCode--) |  |
| [indexOfItem(T arg0)](#indexOfItem-T-) |  |
| [insert(int index, ImapMessageInfo item)](#insert-int-com.aspose.email.ImapMessageInfo-) | Insert the specified ImapMessagInfo object at the specified index. |
| [insertItem(int arg0, T arg1)](#insertItem-int-T-) |  |
| [isReadOnly()](#isReadOnly--) |  |
| [iterator()](#iterator--) |  |
| [notify()](#notify--) |  |
| [notifyAll()](#notifyAll--) |  |
| [remove(ImapMessageInfo item)](#remove-com.aspose.email.ImapMessageInfo-) | Remove specifed ImapMessageInfo object from this collection. |
| [removeAt(int index)](#removeAt-int-) | Remove a ImapMessageInfo in specified index from this collection. |
| [removeItem(T arg0)](#removeItem-T-) |  |
| [set_Item(int arg0, T arg1)](#set-Item-int-T-) |  |
| [size()](#size--) |  |
| [toString()](#toString--) |  |
| [to_(ImapMessageInfoCollection messageInfoCol)](#to--com.aspose.email.ImapMessageInfoCollection-) | Converts collection of ImapMessageInfo to array |
| [to_ImapMessageInfoCollection(ImapMessageInfo[] messageInfoArr)](#to-ImapMessageInfoCollection-com.aspose.email.ImapMessageInfo---) | Converts array of ImapMessageInfo to collection |
| [to_ImapMessageInfoCollection(System.Collections.Generic.List<ImapMessageInfo> messageInfoLst)](#to-ImapMessageInfoCollection-com.aspose.ms.System.Collections.Generic.List-com.aspose.email.ImapMessageInfo--) | Converts list of ImapMessageInfo to collection |
| [to_List(ImapMessageInfoCollection messageInfoCol)](#to-List-com.aspose.email.ImapMessageInfoCollection-) | Converts collection of ImapMessageInfo to list |
| [wait()](#wait--) |  |
| [wait(long arg0)](#wait-long-) |  |
| [wait(long arg0, int arg1)](#wait-long-int-) |  |
### ImapMessageInfoCollection() {#ImapMessageInfoCollection--}
```
public ImapMessageInfoCollection()
```


Initializes a new instance of the ImapMessageCollection class.

### ImapMessageInfoCollection(Iterable<ImapMessageInfo> messageInfoEn) {#ImapMessageInfoCollection-java.lang.Iterable-com.aspose.email.ImapMessageInfo--}
```
public ImapMessageInfoCollection(Iterable<ImapMessageInfo> messageInfoEn)
```


Initializes a new instance of the ImapMessageCollection class

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| messageInfoEn | java.lang.Iterable<com.aspose.email.ImapMessageInfo> | initial value |

### add(ImapMessageInfo item) {#add-com.aspose.email.ImapMessageInfo-}
```
public final void add(ImapMessageInfo item)
```


Adds the ImapMessageInfo to the ImapMessageCollection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [ImapMessageInfo](../../com.aspose.email/imapmessageinfo) | The ImapMessageInfo to be added. |

### addItem(T arg0) {#addItem-T-}
```
public void addItem(T arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | T |  |

### addRange(Iterable<ImapMessageInfo> messageInfos) {#addRange-java.lang.Iterable-com.aspose.email.ImapMessageInfo--}
```
public final void addRange(Iterable<ImapMessageInfo> messageInfos)
```


Adds the enumeration of ImapMessageInfo objects to the end of the collection

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| messageInfos | java.lang.Iterable<com.aspose.email.ImapMessageInfo> |  |

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




### containsItem(T arg0) {#containsItem-T-}
```
public boolean containsItem(T arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | T |  |

**Returns:**
boolean
### copyToTArray(T[] arg0, int arg1) {#copyToTArray-T---int-}
```
public void copyToTArray(T[] arg0, int arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | T[] |  |
| arg1 | int |  |

### equals(Object arg0) {#equals-java.lang.Object-}
```
public boolean equals(Object arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | java.lang.Object |  |

**Returns:**
boolean
### getClass() {#getClass--}
```
public final native Class<?> getClass()
```




**Returns:**
java.lang.Class<?>
### getExceptions() {#getExceptions--}
```
public final List<ElementProcessingException> getExceptions()
```


Gets collection of exceptions, that occurred during message processing.

**Returns:**
java.util.List<com.aspose.email.ElementProcessingException>
### getICollection() {#getICollection--}
```
public System.Collections.ICollection getICollection()
```




**Returns:**
com.aspose.ms.System.Collections.ICollection
### getIList() {#getIList--}
```
public System.Collections.IList getIList()
```




**Returns:**
com.aspose.ms.System.Collections.IList
### getSyncRoot() {#getSyncRoot--}
```
public final Object getSyncRoot()
```


Gets an object that can be used to synchronize access to the collection.

**Returns:**
java.lang.Object
### get_Item(int arg0) {#get-Item-int-}
```
public T get_Item(int arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | int |  |

**Returns:**
T
### hashCode() {#hashCode--}
```
public native int hashCode()
```




**Returns:**
int
### indexOfItem(T arg0) {#indexOfItem-T-}
```
public int indexOfItem(T arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | T |  |

**Returns:**
int
### insert(int index, ImapMessageInfo item) {#insert-int-com.aspose.email.ImapMessageInfo-}
```
public final void insert(int index, ImapMessageInfo item)
```


Insert the specified ImapMessagInfo object at the specified index.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| index | int | The index that the specified object will be inserted into. |
| item | [ImapMessageInfo](../../com.aspose.email/imapmessageinfo) | The ImapMessagInfo object to be inserted. |

### insertItem(int arg0, T arg1) {#insertItem-int-T-}
```
public void insertItem(int arg0, T arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | int |  |
| arg1 | T |  |

### isReadOnly() {#isReadOnly--}
```
public boolean isReadOnly()
```




**Returns:**
boolean
### iterator() {#iterator--}
```
public System.Collections.Generic.IGenericEnumerator<T> iterator()
```




**Returns:**
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<T>
### notify() {#notify--}
```
public final native void notify()
```




### notifyAll() {#notifyAll--}
```
public final native void notifyAll()
```




### remove(ImapMessageInfo item) {#remove-com.aspose.email.ImapMessageInfo-}
```
public final boolean remove(ImapMessageInfo item)
```


Remove specifed ImapMessageInfo object from this collection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [ImapMessageInfo](../../com.aspose.email/imapmessageinfo) | The ImapMessageInfo object to be remove. |

**Returns:**
boolean - False if this collection doesn't contains specified object.True if removed successfully.
### removeAt(int index) {#removeAt-int-}
```
public final void removeAt(int index)
```


Remove a ImapMessageInfo in specified index from this collection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| index | int | The index of the message to be remove. |

### removeItem(T arg0) {#removeItem-T-}
```
public boolean removeItem(T arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | T |  |

**Returns:**
boolean
### set_Item(int arg0, T arg1) {#set-Item-int-T-}
```
public void set_Item(int arg0, T arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | int |  |
| arg1 | T |  |

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




**Returns:**
int
### toString() {#toString--}
```
public String toString()
```




**Returns:**
java.lang.String
### to_(ImapMessageInfoCollection messageInfoCol) {#to--com.aspose.email.ImapMessageInfoCollection-}
```
public static ImapMessageInfo[] to_(ImapMessageInfoCollection messageInfoCol)
```


Converts collection of ImapMessageInfo to array

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| messageInfoCol | [ImapMessageInfoCollection](../../com.aspose.email/imapmessageinfocollection) | Collection of ImapMessageInfo to convert |

**Returns:**
com.aspose.email.ImapMessageInfo[] - Array of ImapMessageInfo
### to_ImapMessageInfoCollection(ImapMessageInfo[] messageInfoArr) {#to-ImapMessageInfoCollection-com.aspose.email.ImapMessageInfo---}
```
public static ImapMessageInfoCollection to_ImapMessageInfoCollection(ImapMessageInfo[] messageInfoArr)
```


Converts array of ImapMessageInfo to collection

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| messageInfoArr | [ImapMessageInfo\[\]](../../com.aspose.email/imapmessageinfo) | Array of ImapMessageInfo to convert |

**Returns:**
[ImapMessageInfoCollection](../../com.aspose.email/imapmessageinfocollection) - Collection of ImapMessageInfo
### to_ImapMessageInfoCollection(System.Collections.Generic.List<ImapMessageInfo> messageInfoLst) {#to-ImapMessageInfoCollection-com.aspose.ms.System.Collections.Generic.List-com.aspose.email.ImapMessageInfo--}
```
public static ImapMessageInfoCollection to_ImapMessageInfoCollection(System.Collections.Generic.List<ImapMessageInfo> messageInfoLst)
```


Converts list of ImapMessageInfo to collection

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| messageInfoLst | com.aspose.ms.System.Collections.Generic.List<com.aspose.email.ImapMessageInfo> | List of ImapMessageInfo to convert |

**Returns:**
[ImapMessageInfoCollection](../../com.aspose.email/imapmessageinfocollection) - Collection of ImapMessageInfo
### to_List(ImapMessageInfoCollection messageInfoCol) {#to-List-com.aspose.email.ImapMessageInfoCollection-}
```
public static System.Collections.Generic.List<ImapMessageInfo> to_List(ImapMessageInfoCollection messageInfoCol)
```


Converts collection of ImapMessageInfo to list

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| messageInfoCol | [ImapMessageInfoCollection](../../com.aspose.email/imapmessageinfocollection) | Collection of ImapMessageInfo to convert |

**Returns:**
com.aspose.ms.System.Collections.Generic.List<com.aspose.email.ImapMessageInfo> - List of ImapMessageInfo
### wait() {#wait--}
```
public final void wait()
```




### wait(long arg0) {#wait-long-}
```
public final native void wait(long arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}
```
public final void wait(long arg0, int arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |

