Package com.castlabs.android.player.models

# Class Timeline

java.lang.Object
com.castlabs.android.player.models.Timeline

public class Timeline extends Object
Timeline object.

Composed of `Timeline.Window`s and `Timeline.Period`s.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Timeline.Builder`
  `static class`
  `Timeline.Period`
  A Period.
  `static class`
  `Timeline.Window`
  A Window.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Timeline`
  `EMPTY`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Timeline.Period`
  `getPeriod(int index)`
  Returns the requested Period
  `int`
  `getPeriodCount()`
  Returns the number of Period in the Timeline
  `List<Timeline.Period>`
  `getPeriods()`
  Returns the List of `Timeline.Period`s
  `Timeline.Window`
  `getWindow(int index)`
  Returns the requested Window
  `int`
  `getWindowCount()`
  Returns the number of Window in the Timeline
  `List<Timeline.Window>`
  `getWindows()`
  Returns the List of `Timeline.Period`s
  `boolean`
  `isEmpty()`

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

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

- ## Field Details

  - ### EMPTY

    public static final Timeline EMPTY

- ## Method Details

  - ### getPeriodCount

    public int getPeriodCount()
    Returns the number of Period in the Timeline
    Returns:
      the number of Period

  - ### getWindowCount

    public int getWindowCount()
    Returns the number of Window in the Timeline
    Returns:
      the number of Window

  - ### getPeriod

    @Nullable public Timeline.Period getPeriod(int index)
    Returns the requested Period
    Parameters:
      `index` - the index of the Period to return
    Returns:
      the Period, or null if out of bounds

  - ### getWindow

    @Nullable public Timeline.Window getWindow(int index)
    Returns the requested Window
    Parameters:
      `index` - the index of the Window to return
    Returns:
      the Window, or null if out of bounds

  - ### getPeriods

    @NonNull public List<Timeline.Period> getPeriods()
    Returns the List of `Timeline.Period`s
    Returns:
      the List of `Timeline.Period`s

  - ### getWindows

    @NonNull public List<Timeline.Window> getWindows()
    Returns the List of `Timeline.Period`s
    Returns:
      the List of `Timeline.Period`s

  - ### isEmpty

    public boolean isEmpty()
    Returns:
      whether the Timeline is empty.