
**Inheritance:**
java.lang.Object, java.util.AbstractCollection
```
public class RiskPatternCollection extends AbstractCollection<RiskPattern>
```

Represents a collection containing the instances of the `RiskPattern` class.
## Methods

| Method | Description |
| --- | --- |
| [add(RiskPattern item)](#add-com.aspose.tasks.RiskPattern-) | Adds an instance of the `RiskPattern` class to this collection. |
| [clear()](#clear--) | Removes all items from this collection. |
| [contains(Object item)](#contains-java.lang.Object-) | Returns true if the specified item is found in this collection; otherwise, false. |
| [copyTo(RiskPattern[] array, int arrayIndex)](#copyTo-com.aspose.tasks.RiskPattern---int-) | Copies the elements of this collection to the specified array, starting at the specified array index. |
| [get_Item(Task task)](#get-Item-com.aspose.tasks.Task-) | Gets the instance of the `RiskPattern` class for the specified task. |
| [iterator()](#iterator--) | Returns an enumerator for this collection. |
| [remove(Object item)](#remove-java.lang.Object-) | Removes the first occurrence of a specific object from this collection. |
| [size()](#size--) | Returns the number of elements contained in this collection. |
### add(RiskPattern item) {#add-com.aspose.tasks.RiskPattern-}
```
public boolean add(RiskPattern item)
```


Adds an instance of the `RiskPattern` class to this collection.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | [RiskPattern](../../com.aspose.tasks/riskpattern) | an instance of the `RiskPattern` class to add to this collection. |

**Returns:**
boolean - returns true if an instance of the `RiskPattern` class was added successfully; otherwise, false.
### clear() {#clear--}
```
public void clear()
```


Removes all items from this collection.

### contains(Object item) {#contains-java.lang.Object-}
```
public boolean contains(Object item)
```


Returns true if the specified item is found in this collection; otherwise, false.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | java.lang.Object | the specified item to find. |

**Returns:**
boolean - true if the specified item is found in this collection; otherwise, false.
### copyTo(RiskPattern[] array, int arrayIndex) {#copyTo-com.aspose.tasks.RiskPattern---int-}
```
public void copyTo(RiskPattern[] array, int arrayIndex)
```


Copies the elements of this collection to the specified array, starting at the specified array index.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| array | [RiskPattern\[\]](../../com.aspose.tasks/riskpattern) | the specified one-dimentional array to copy elements to |
| arrayIndex | int | the zero-based index of the specified array at which copying begins. |

### get_Item(Task task) {#get-Item-com.aspose.tasks.Task-}
```
public RiskPattern get_Item(Task task)
```


Gets the instance of the `RiskPattern` class for the specified task.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| task | [Task](../../com.aspose.tasks/task) | the specified task. |

**Returns:**
[RiskPattern](../../com.aspose.tasks/riskpattern) - the pattern for the specified task.
### iterator() {#iterator--}
```
public Iterator<RiskPattern> iterator()
```


Returns an enumerator for this collection.

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


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

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| item | java.lang.Object | the specified object to remove. |

**Returns:**
boolean - true if the specified object was successfully removed from this collection; otherwise, false.
### size() {#size--}
```
public int size()
```


Returns the number of elements contained in this collection.

**Returns:**
int - the number of elements contained in this collection.
