Methods
close()
Close the collection, freeing up any resources.
Throws:
-
if the collection has already been closed
- Type
- hrrokkin_engine.ValueCollectionClosedError
(async) get(index) → {Promise.<*>}
Retrieve a value from the collection
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | the index into the collection |
Throws:
-
-
if the collection has been closed
- Type
- hrrokkin_engine.ValueCollectionClosedError
-
-
-
if the index is out of range
- Type
- hrrokkin_engine.IndexError
-
Returns:
a promise that resolves to the returned value
- Type
- Promise.<*>
size() → {int}
Get the size of this collection
Throws:
-
if the collection has been closed
- Type
- hrrokkin_engine.ValueCollectionClosedError
Returns:
the number of items in the collection
- Type
- int
(static) create_from_collections(source_collections, transform_fn) → {hyrrokkin_engine.ValueCollection}
Create a collection by concatenating one or more collections
Parameters:
| Name | Type | Description |
|---|---|---|
source_collections |
Array.<hyrrokkin_engine.ValueCollection> | the collections to concatenate |
transform_fn |
transformFunction | asyncTransformFunction | an optional function to transform values from the source collections into this collection |
Returns:
(static) create_from_store(value_store) → {hyrrokkin_engine.ValueCollection}
Create a collection based on a value store
Parameters:
| Name | Type | Description |
|---|---|---|
value_store |
hyrrokkin_engine.ValueStore | an object implementing the ValueStore interface which is used to store values held in the collection |
Returns:
A new ValueCollection instance