Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RemoteMediaCollection

A collection of remote medias.

Hierarchy

  • Collection<RemoteMedia, RemoteMediaCollection>
    • RemoteMediaCollection

Index

Constructors

constructor

Properties

Private __lookup

__lookup: Hash<string, RemoteMedia>
internal

Private __lookupLock

__lookupLock: Object
internal

Methods

add

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

    Parameters

    • value: RemoteMedia

      The value.

    Returns boolean

addMany

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

    Parameters

    • values: RemoteMedia[]

      The values.

    Returns boolean

Protected addSuccess

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

    Parameters

    • value: RemoteMedia

      The value.

    Returns void

any

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

    Parameters

    • predicate: IFunction1<RemoteMedia, boolean>

      The predicate.

    Returns boolean

  • Determined whether the collection contains at least one value.

    Returns boolean

Protected arrayFromList

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

    Parameters

    • list: Array<RemoteMedia>

      The list.

    Returns RemoteMedia[]

contains

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

    Parameters

    • value: RemoteMedia

      The value.

    Returns boolean

Protected createCollection

  • createCollection(): RemoteMediaCollection
  • Creates a collection.

    Returns RemoteMediaCollection

first

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

    Parameters

    • predicate: IFunction1<RemoteMedia, boolean>

      The predicate.

    Returns RemoteMedia

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

    Returns RemoteMedia

firstOrDefault

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

    Returns RemoteMedia

  • 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<RemoteMedia, boolean>

      The predicate.

    Returns RemoteMedia

forEach

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

    Parameters

    • callback: IAction2<RemoteMedia, number>

      The callback to execute.

    Returns void

getById

  • getById(id: string): RemoteMedia
  • Gets a media by ID.

    Parameters

    • id: string

      The identifier.

    Returns RemoteMedia

getCount

  • getCount(): number
  • Gets the count.

    Returns number

getTypeString

  • getTypeString(): string

getValue

  • getValue(): RemoteMedia
  • Gets the value.

    Returns RemoteMedia

getValues

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

    Returns RemoteMedia[]

last

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

    Parameters

    • predicate: IFunction1<RemoteMedia, boolean>

      The predicate.

    Returns RemoteMedia

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

    Returns RemoteMedia

lastOrDefault

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

      The predicate.

    Returns RemoteMedia

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

    Returns RemoteMedia

remove

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

    Parameters

    • value: RemoteMedia

      The value.

    Returns boolean

removeAll

  • removeAll(): void
  • Removes all values.

    Returns void

removeFirst

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

    Parameters

    • condition: IFunction1<RemoteMedia, boolean>

    Returns RemoteMedia

  • Removes the first value.

    Returns RemoteMedia

removeLast

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

    Returns RemoteMedia

  • Removes the last value that matches a given condition.

    Parameters

    • condition: IFunction1<RemoteMedia, boolean>

    Returns RemoteMedia

removeMany

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

    Parameters

    • values: RemoteMedia[]

      The values.

    Returns boolean

Protected removeSuccess

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

    Parameters

    • value: RemoteMedia

      The value.

    Returns void

replace

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

    Parameters

    • values: RemoteMedia[]

      The values.

    Returns void

setValue

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

    Parameters

    • value: RemoteMedia

    Returns void

setValues

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

    Parameters

    • value: RemoteMedia[]

    Returns void

single

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

    Returns RemoteMedia

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

    Returns RemoteMedia

singleOrDefault

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

    Returns RemoteMedia

  • 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<RemoteMedia, boolean>

    Returns RemoteMedia

valueAt

  • valueAt(index: number): RemoteMedia
  • 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 RemoteMedia

valueAtOrDefault

  • valueAtOrDefault(index: number): RemoteMedia
  • 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 RemoteMedia

where

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

    Parameters

    • predicate: IFunction2<RemoteMedia, number, boolean>

      The predicate.

    Returns RemoteMediaCollection