Package com.castlabs.android.player.models.mpd

# Class EventStream.Builder

java.lang.Object
com.castlabs.android.player.models.mpd.EventStream.Builder

Enclosing class:
  `EventStream`

public static class EventStream.Builder extends Object
Builder for creating EventStream instances.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder(String schemeIdUri, String value)`
  Creates a new Builder.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `EventStream.Builder`
  `addEvents(EventMessage[] events)`
  Adds events from an array.
  `EventStream.Builder`
  `addEvents(Collection<? extends EventMessage> events)`
  Adds events from a collection.
  `EventStream.Builder`
  `addPresentationTimesUs(Long[] presentationTimes)`
  Adds presentation times from an array.
  `EventStream.Builder`
  `addPresentationTimesUs(Collection<Long> presentationTimes)`
  Adds presentation times from a collection.
  `EventStream`
  `get()`
  Builds a new EventStream instance.
  `EventStream.Builder`
  `timescale(long timescale)`
  Sets the timescale.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder(@NonNull String schemeIdUri, @NonNull String value)
    Creates a new Builder.
    Parameters:
      `schemeIdUri` - The scheme URI
      `value` - The value of the event stream

- ## Method Details

  - ### timescale

    @NonNull public EventStream.Builder timescale(long timescale)
    Sets the timescale.
    Parameters:
      `timescale` - The timescale in units per seconds
    Returns:
      This builder

  - ### addPresentationTimesUs

    @NonNull public EventStream.Builder addPresentationTimesUs(@NonNull Collection<Long> presentationTimes)
    Adds presentation times from a collection.
    Parameters:
      `presentationTimes` - The collection of presentation times to add
    Returns:
      This builder

  - ### addPresentationTimesUs

    @NonNull public EventStream.Builder addPresentationTimesUs(@NonNull Long[] presentationTimes)
    Adds presentation times from an array.
    Parameters:
      `presentationTimes` - The array of presentation times to add
    Returns:
      This builder

  - ### addEvents

    @NonNull public EventStream.Builder addEvents(@NonNull Collection<? extends EventMessage> events)
    Adds events from a collection.
    Parameters:
      `events` - The collection of events to add
    Returns:
      This builder

  - ### addEvents

    @NonNull public EventStream.Builder addEvents(@NonNull EventMessage[] events)
    Adds events from an array.
    Parameters:
      `events` - The array of events to add
    Returns:
      This builder

  - ### get

    @NonNull public EventStream get()
    Builds a new EventStream instance.
    Returns:
      A new EventStream instance