Package com.castlabs.android.player

## Class Chapter

- java.lang.Object
- - com.castlabs.android.player.Chapter

-     public class Chapter
      extends Object

  Basic chapter model that consists of the chapter position, a title, and an image URL. Both, the title and the image URL are optional.
  Since:
    2.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `Uri` | `imageUrl` | (Optional) URI to an image
    `long` | `positionMs` | The chapter position in milliseconds
    `String` | `title` | (Optional) title

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Chapter​(long position)` | Create a new chapter
    `Chapter​(long positionMs, long endPositionMs, String title, Uri imageUrl)` | Create a new chapter
    `Chapter​(long position, String title)` | Create a new chapter
    `Chapter​(long positionMs, String title, Uri imageUrl)` | Create a new chapter

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `getEndPositionMs()` |
    `boolean` | `isHighlighted()` |
    `boolean` | `isShown​(long positionMs)` |
    `void` | `setEndPositionMs​(long endPositionMs)` |
    `void` | `setHighlighted​(boolean highlighted)` |

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

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

- - ### Field Detail

    - #### positionMs

          public final long positionMs

      The chapter position in milliseconds

    - #### title

          @Nullable
          public final String title

      (Optional) title

    - #### imageUrl

          @Nullable
          public final Uri imageUrl

      (Optional) URI to an image

  - ### Constructor Detail

    - #### Chapter

          public Chapter​(long position)

      Create a new chapter
      Parameters:
        `position` - the chapter position

    - #### Chapter

          public Chapter​(long position,
                         String title)

      Create a new chapter
      Parameters:
        `position` - the chapter position in milliseconds
        `title` - the chapter title

    - #### Chapter

          public Chapter​(long positionMs,
                         String title,
                         Uri imageUrl)

      Create a new chapter
      Parameters:
        `positionMs` - the position of the chapter start in ms
        `title` - the title (optional)
        `imageUrl` - the image url (optional)

    - #### Chapter

          public Chapter​(long positionMs,
                         long endPositionMs,
                         String title,
                         Uri imageUrl)

      Create a new chapter
      Parameters:
        `positionMs` - the position of the chapter start in ms
        `endPositionMs` - the end position in ms or -1
        `title` - the title (optional)
        `imageUrl` - the image url (optional)

  - ### Method Detail

    - #### getEndPositionMs

          public long getEndPositionMs()

    - #### setEndPositionMs

          public void setEndPositionMs​(long endPositionMs)

    - #### isHighlighted

          public boolean isHighlighted()

    - #### setHighlighted

          public void setHighlighted​(boolean highlighted)

    - #### isShown

          public boolean isShown​(long positionMs)