# Class: CollectionObjectType

## CollectionObjectType(collectionSubType, elementTypeopt)

Class representing a collection type of Ignite object.

It is described by COMPOSITE_TYPE.COLLECTION ObjectType.COMPOSITE_TYPE and one of CollectionObjectType.COLLECTION_SUBTYPE.

## Constructor

#### new CollectionObjectType(collectionSubType, elementTypeopt)

Public constructor.

Specifies a kind of collection and optionally specifies a type of elements in the collection.

If the type of elements is not specified then during operations the Ignite client will try to make automatic mapping between JavaScript types and Ignite object types - according to the mapping table defined in the description of the ObjectType class.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`collectionSubType` | CollectionObjectType.COLLECTION_SUBTYPE |  |  | collection subtype, one of the CollectionObjectType.COLLECTION_SUBTYPE constants.
`elementType` | ObjectType.PRIMITIVE_TYPE | CompositeType | <optional> | null | type of elements in the collection: either a type code of primitive (simple) type or an instance of class representing non-primitive (composite) type or null (or not specified) that means the type is not specified

Source:
  - ObjectType.js, line 413

### Extends

- CompositeType

### Members

#### (static, readonly) COLLECTION_SUBTYPE

Supported kinds of collections.

##### Properties:

Name | Type | Description
--- | --- | ---
`USER_SET` |  | 1
`USER_COL` |  | 0
`ARRAY_LIST` |  | 1
`LINKED_LIST` |  | 2
`HASH_SET` |  | 3
`LINKED_HASH_SET` |  | 4
`SINGLETON_LIST` |  | 5

Source:
  - ObjectType.js, line 382