Package com.google.android.exoplayer2.util

## Class RepeatModeUtil

- java.lang.Object
- - com.google.android.exoplayer2.util.RepeatModeUtil

-     public final class RepeatModeUtil
      extends Object

  Util class for repeat mode handling.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `RepeatModeUtil.RepeatToggleModes` | Set of repeat toggle modes.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `REPEAT_TOGGLE_MODE_ALL` | "Repeat All" button enabled.
    `static int` | `REPEAT_TOGGLE_MODE_NONE` | All repeat mode buttons disabled.
    `static int` | `REPEAT_TOGGLE_MODE_ONE` | "Repeat One" button enabled.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static @com.google.android.exoplayer2.Player.RepeatMode int` | `getNextRepeatMode​(@com.google.android.exoplayer2.Player.RepeatMode int currentMode, int enabledModes)` | Gets the next repeat mode out of `enabledModes` starting from `currentMode`.
    `static boolean` | `isRepeatModeEnabled​(@com.google.android.exoplayer2.Player.RepeatMode int repeatMode, int enabledModes)` | Verifies whether a given `repeatMode` is enabled in the bitmask `enabledModes`.

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

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

- - ### Field Detail

    - #### REPEAT_TOGGLE_MODE_NONE

          public static final int REPEAT_TOGGLE_MODE_NONE

      All repeat mode buttons disabled.
      See Also:
        Constant Field Values

    - #### REPEAT_TOGGLE_MODE_ONE

          public static final int REPEAT_TOGGLE_MODE_ONE

      "Repeat One" button enabled.
      See Also:
        Constant Field Values

    - #### REPEAT_TOGGLE_MODE_ALL

          public static final int REPEAT_TOGGLE_MODE_ALL

      "Repeat All" button enabled.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getNextRepeatMode

          @RepeatMode
          public static @com.google.android.exoplayer2.Player.RepeatMode int getNextRepeatMode​(@RepeatMode
                                                                                               @com.google.android.exoplayer2.Player.RepeatMode int currentMode,
                                                                                               int enabledModes)

      Gets the next repeat mode out of `enabledModes` starting from `currentMode`.
      Parameters:
        `currentMode` - The current repeat mode.
        `enabledModes` - Bitmask of enabled modes.
      Returns:
        The next repeat mode.

    - #### isRepeatModeEnabled

          public static boolean isRepeatModeEnabled​(@RepeatMode
                                                    @com.google.android.exoplayer2.Player.RepeatMode int repeatMode,
                                                    int enabledModes)

      Verifies whether a given `repeatMode` is enabled in the bitmask `enabledModes`.
      Parameters:
        `repeatMode` - The mode to check.
        `enabledModes` - The bitmask representing the enabled modes.
      Returns:
        `true` if enabled.