/ fm / liveswitch / StreamCollection
Class: StreamCollection
fm.liveswitch.StreamCollection
A stream collection.
Hierarchy
Collection<WebRtcStream, StreamCollection>
↳ StreamCollection
Table of contents
Constructors
Methods
- add
- addMany
- addSuccess
- addSuccessNoLock
- any
- arrayFromList
- contains
- createCollection
- first
- firstOrDefault
- forEach
- getByType
- getCount
- getManyByType
- getTypeString
- getValue
- getValues
- last
- lastOrDefault
- remove
- removeAll
- removeFirst
- removeLast
- removeMany
- removeSuccess
- removeSuccessNoLock
- replace
- setValue
- setValues
- single
- singleOrDefault
- toArray
- valueAt
- valueAtOrDefault
- where
Constructors
constructor
+ new StreamCollection(): StreamCollection
Returns: StreamCollection
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/StreamCollection.ts:12
Methods
add
▸ add(value
: WebRtcStream): boolean
Adds a value.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: boolean
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:44
addMany
▸ addMany(values
: WebRtcStream[]): void
Adds some values.
Parameters:
Name | Type | Description |
---|---|---|
values |
WebRtcStream[] | The values. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:69
addSuccess
▸ Protected
addSuccess(value
: WebRtcStream): void
Invoked when an element is added to the collection.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:95
addSuccessNoLock
▸ Protected
addSuccessNoLock(value
: WebRtcStream): void
Invoked after an element is added to the collection.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:107
any
▸ any(): boolean
Determined whether the collection contains at least one value.
Returns: boolean
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:118
▸ any(predicate
: IFunction1<WebRtcStream, boolean>): boolean
Determined whether the collection contains at least one value that matches the specified predicate.
Parameters:
Name | Type | Description |
---|---|---|
predicate |
IFunction1<WebRtcStream, boolean> | The predicate. |
Returns: boolean
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:126
arrayFromList
▸ Protected
arrayFromList(list
: WebRtcStream[]): WebRtcStream[]
Creates an array from a list.
Parameters:
Name | Type | Description |
---|---|---|
list |
WebRtcStream[] | The list. |
Returns: WebRtcStream[]
Overrides: Collection
Defined in: Generated/TypeScript/fm.liveswitch/StreamCollection.ts:30
contains
▸ contains(value
: WebRtcStream): boolean
Determines whether the collection contains a value.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: boolean
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:155
createCollection
▸ Protected
createCollection(): StreamCollection
Creates a collection.
Returns: StreamCollection
Overrides: Collection
Defined in: Generated/TypeScript/fm.liveswitch/StreamCollection.ts:42
first
▸ first(): WebRtcStream
Gets the first value. Throws an exception if there are no values in the collection.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:178
▸ first(predicate
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Gets the first value that matches the specified predicate. Throws an exception if there are no such values in the collection.
Parameters:
Name | Type | Description |
---|---|---|
predicate |
IFunction1<WebRtcStream, boolean> | The predicate. |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:188
firstOrDefault
▸ firstOrDefault(): WebRtcStream
Gets the first value. Returns a default value if there are no values in the collection.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:214
▸ firstOrDefault(predicate
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Gets the first value that matches the specified predicate. Returns a default value if there are no such values in the collection.
Parameters:
Name | Type | Description |
---|---|---|
predicate |
IFunction1<WebRtcStream, boolean> | The predicate. |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:224
forEach
▸ forEach(callback
: IAction2<WebRtcStream, number>): void
Executes a callback function once per value.
Parameters:
Name | Type | Description |
---|---|---|
callback |
IAction2<WebRtcStream, number> | The callback to execute. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:247
getByType
▸ getByType<T>(type
: StreamType): T
Gets a stream by its type.
Type parameters:
Name | Type |
---|---|
T |
WebRtcStream<T> |
Parameters:
Name | Type |
---|---|
type |
StreamType |
Returns: T
Defined in: Generated/TypeScript/fm.liveswitch/StreamCollection.ts:54
getCount
▸ getCount(): number
Gets the count.
Returns: number
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:262
getManyByType
▸ getManyByType<T>(type
: StreamType): T[]
Gets some streams by their type.
Type parameters:
Name | Type |
---|---|
T |
WebRtcStream<T> |
Parameters:
Name | Type |
---|---|
type |
StreamType |
Returns: T[]
Defined in: Generated/TypeScript/fm.liveswitch/StreamCollection.ts:71
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: Collection
Defined in: Generated/TypeScript/fm.liveswitch/StreamCollection.ts:10
getValue
▸ getValue(): WebRtcStream
Gets the value.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:274
getValues
▸ getValues(): WebRtcStream[]
Gets the values.
Returns: WebRtcStream[]
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:289
last
▸ last(): WebRtcStream
Gets the last value. Throws an exception if there are no values in the collection.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:303
▸ last(predicate
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Gets the last value that matches the specified predicate. Throws an exception if there are no such values in the collection.
Parameters:
Name | Type | Description |
---|---|---|
predicate |
IFunction1<WebRtcStream, boolean> | The predicate. |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:313
lastOrDefault
▸ lastOrDefault(): WebRtcStream
Gets the last value. Returns a default value if there are no values in the collection.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:339
▸ lastOrDefault(predicate
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Gets the last value that matches the specified predicate. Returns a default value if there are no such values in the collection.
Parameters:
Name | Type | Description |
---|---|---|
predicate |
IFunction1<WebRtcStream, boolean> | The predicate. |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:349
remove
▸ remove(value
: WebRtcStream): boolean
Removes a value.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: boolean
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:372
removeAll
▸ removeAll(): void
Removes all values.
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:395
removeFirst
▸ removeFirst(): WebRtcStream
Removes the first value.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:416
▸ removeFirst(condition
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Removes the first value that matches a given condition.
Parameters:
Name | Type |
---|---|
condition |
IFunction1<WebRtcStream, boolean> |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:422
removeLast
▸ removeLast(): WebRtcStream
Removes the last value.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:449
▸ removeLast(condition
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Removes the last value that matches a given condition.
Parameters:
Name | Type |
---|---|
condition |
IFunction1<WebRtcStream, boolean> |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:455
removeMany
▸ removeMany(values
: WebRtcStream[]): void
Removes some values.
Parameters:
Name | Type | Description |
---|---|---|
values |
WebRtcStream[] | The values. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:483
removeSuccess
▸ Protected
removeSuccess(value
: WebRtcStream): void
Invoked when an element is removed from the collection.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:508
removeSuccessNoLock
▸ Protected
removeSuccessNoLock(value
: WebRtcStream): void
Invoked after an element is removed from the collection.
Parameters:
Name | Type | Description |
---|---|---|
value |
WebRtcStream | The value. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:520
replace
▸ replace(values
: WebRtcStream[]): void
Replaces the collection with a new set of values.
Parameters:
Name | Type | Description |
---|---|---|
values |
WebRtcStream[] | The values. |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:532
setValue
▸ setValue(value
: WebRtcStream): void
Sets the value.
Parameters:
Name | Type |
---|---|
value |
WebRtcStream |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:548
setValues
▸ setValues(value
: WebRtcStream[]): void
Sets the values.
Parameters:
Name | Type |
---|---|
value |
WebRtcStream[] |
Returns: void
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:564
single
▸ single(): WebRtcStream
Gets the only value. Throws an exception if there are no values or more than one value in the collection.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:583
▸ single(predicate
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Gets the only value that matches the specified predicate. Throws an exception if there are no values or more than one value in the collection.
Parameters:
Name | Type |
---|---|
predicate |
IFunction1<WebRtcStream, boolean> |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:593
singleOrDefault
▸ singleOrDefault(): WebRtcStream
Gets the only value. Returns a default value if there are no values or more than one value in the collection.
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:620
▸ singleOrDefault(predicate
: IFunction1<WebRtcStream, boolean>): WebRtcStream
Gets the only value that matches the specified predicate. Returns a default value if there are no values or more than one value in the collection.
Parameters:
Name | Type |
---|---|
predicate |
IFunction1<WebRtcStream, boolean> |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:630
toArray
▸ toArray(): WebRtcStream[]
Clones the values into a new array.
Returns: WebRtcStream[]
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:658
valueAt
▸ valueAt(index
: number): WebRtcStream
Gets the value at the specified index. Throws an exception if a value does not exist at that index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:673
valueAtOrDefault
▸ valueAtOrDefault(index
: number): WebRtcStream
Gets the value at the specified index. Returns a default value if a value does not exist at that index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns: WebRtcStream
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:693
where
▸ where(predicate
: IFunction2<WebRtcStream, number, boolean>): StreamCollection
Creates a new collection with values that match the specified predicate.
Parameters:
Name | Type | Description |
---|---|---|
predicate |
IFunction2<WebRtcStream, number, boolean> | The predicate. |
Returns: StreamCollection
Inherited from: Collection
Defined in: Generated/TypeScript/fm.liveswitch/Collection.ts:715