Class RepeatModeUtil


  • public final class RepeatModeUtil
    extends Object
    Util class for repeat mode handling.
    • 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 int getNextRepeatMode​(@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
                                                  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.