Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StreamCollection

A stream collection.

Hierarchy

  • Collection<WebRtcStream, StreamCollection>
    • StreamCollection

Index

Constructors

constructor

Methods

add

  • add(value: WebRtcStream): boolean
  • Adds a value.

    Parameters

    • value: WebRtcStream

      The value.

    Returns boolean

addMany

  • addMany(values: WebRtcStream[]): boolean
  • Adds some values.

    Parameters

    • values: WebRtcStream[]

      The values.

    Returns boolean

Protected addSuccess

  • addSuccess(value: WebRtcStream): void
  • Invoked when an element is added to the collection.

    Parameters

    • value: WebRtcStream

      The value.

    Returns void

any

  • any(predicate: IFunction1<WebRtcStream, boolean>): boolean
  • any(): boolean
  • Determined whether the collection contains at least one value that matches the specified predicate.

    Parameters

    • predicate: IFunction1<WebRtcStream, boolean>

      The predicate.

    Returns boolean

  • Determined whether the collection contains at least one value.

    Returns boolean

Protected arrayFromList

  • arrayFromList(list: Array<WebRtcStream>): WebRtcStream[]
  • Creates an array from a list.

    Parameters

    • list: Array<WebRtcStream>

      The list.

    Returns WebRtcStream[]

contains

  • contains(value: WebRtcStream): boolean
  • Determines whether the collection contains a value.

    Parameters

    • value: WebRtcStream

      The value.

    Returns boolean

Protected createCollection

  • createCollection(): StreamCollection
  • Creates a collection.

    Returns StreamCollection

first

  • first(predicate: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • first(): WebRtcStream
  • Gets the first value that matches the specified predicate. Throws an exception if there are no such values in the collection.

    Parameters

    • predicate: IFunction1<WebRtcStream, boolean>

      The predicate.

    Returns WebRtcStream

  • Gets the first value. Throws an exception if there are no values in the collection.

    Returns WebRtcStream

firstOrDefault

  • firstOrDefault(): WebRtcStream
  • firstOrDefault(predicate: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • Gets the first value. Returns a default value if there are no values in the collection.

    Returns WebRtcStream

  • Gets the first value that matches the specified predicate. Returns a default value if there are no such values in the collection.

    Parameters

    • predicate: IFunction1<WebRtcStream, boolean>

      The predicate.

    Returns WebRtcStream

forEach

  • forEach(callback: IAction2<WebRtcStream, number>): void
  • Executes a callback function once per value.

    Parameters

    • callback: IAction2<WebRtcStream, number>

      The callback to execute.

    Returns void

getByType

  • getByType<T>(type: StreamType): T
  • Gets a stream by its type.

    Type parameters

    • T: WebRtcStream

    Parameters

    • type: StreamType

    Returns T

getCount

  • getCount(): number
  • Gets the count.

    Returns number

getManyByType

  • getManyByType<T>(type: StreamType): Array<T>
  • Gets some streams by their type.

    Type parameters

    • T: WebRtcStream

    Parameters

    • type: StreamType

    Returns Array<T>

getTypeString

  • getTypeString(): string

getValue

  • getValue(): WebRtcStream
  • Gets the value.

    Returns WebRtcStream

getValues

  • getValues(): WebRtcStream[]
  • Gets the values.

    Returns WebRtcStream[]

last

  • last(predicate: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • last(): WebRtcStream
  • Gets the last value that matches the specified predicate. Throws an exception if there are no such values in the collection.

    Parameters

    • predicate: IFunction1<WebRtcStream, boolean>

      The predicate.

    Returns WebRtcStream

  • Gets the last value. Throws an exception if there are no values in the collection.

    Returns WebRtcStream

lastOrDefault

  • lastOrDefault(predicate: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • lastOrDefault(): WebRtcStream
  • Gets the last value that matches the specified predicate. Returns a default value if there are no such values in the collection.

    Parameters

    • predicate: IFunction1<WebRtcStream, boolean>

      The predicate.

    Returns WebRtcStream

  • Gets the last value. Returns a default value if there are no values in the collection.

    Returns WebRtcStream

remove

  • remove(value: WebRtcStream): boolean
  • Removes a value.

    Parameters

    • value: WebRtcStream

      The value.

    Returns boolean

removeAll

  • removeAll(): void
  • Removes all values.

    Returns void

removeFirst

  • removeFirst(condition: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • removeFirst(): WebRtcStream
  • Removes the first value that matches a given condition.

    Parameters

    • condition: IFunction1<WebRtcStream, boolean>

    Returns WebRtcStream

  • Removes the first value.

    Returns WebRtcStream

removeLast

  • removeLast(): WebRtcStream
  • removeLast(condition: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • Removes the last value.

    Returns WebRtcStream

  • Removes the last value that matches a given condition.

    Parameters

    • condition: IFunction1<WebRtcStream, boolean>

    Returns WebRtcStream

removeMany

  • removeMany(values: WebRtcStream[]): boolean
  • Removes some values.

    Parameters

    • values: WebRtcStream[]

      The values.

    Returns boolean

Protected removeSuccess

  • removeSuccess(value: WebRtcStream): void
  • Invoked when an element is removed from the collection.

    Parameters

    • value: WebRtcStream

      The value.

    Returns void

replace

  • replace(values: WebRtcStream[]): void
  • Replaces the collection with a new set of values.

    Parameters

    • values: WebRtcStream[]

      The values.

    Returns void

setValue

  • setValue(value: WebRtcStream): void
  • Sets the value.

    Parameters

    • value: WebRtcStream

    Returns void

setValues

  • setValues(value: WebRtcStream[]): void
  • Sets the values.

    Parameters

    • value: WebRtcStream[]

    Returns void

single

  • single(predicate: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • single(): 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

    • predicate: IFunction1<WebRtcStream, boolean>

    Returns WebRtcStream

  • Gets the only value. Throws an exception if there are no values or more than one value in the collection.

    Returns WebRtcStream

singleOrDefault

  • singleOrDefault(): WebRtcStream
  • singleOrDefault(predicate: IFunction1<WebRtcStream, boolean>): WebRtcStream
  • Gets the only value. Returns a default value if there are no values or more than one value in the collection.

    Returns 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

    • predicate: IFunction1<WebRtcStream, boolean>

    Returns WebRtcStream

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

    • index: number

      The index.

    Returns WebRtcStream

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

    • index: number

      The index.

    Returns WebRtcStream

where

  • where(predicate: IFunction2<WebRtcStream, number, boolean>): StreamCollection
  • Creates a new collection with values that match the specified predicate.

    Parameters

    • predicate: IFunction2<WebRtcStream, number, boolean>

      The predicate.

    Returns StreamCollection