Back to Exoplayer

ShuffleOrder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/ShuffleOrder.html

latest5.1 KB
Original Source

Package com.google.android.exoplayer2.source

Interface ShuffleOrder

  • All Known Implementing Classes:FakeShuffleOrder, ShuffleOrder.DefaultShuffleOrder, ShuffleOrder.UnshuffledShuffleOrder

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceShuffleOrder

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Shuffled order of indices.

The shuffle order must be immutable to ensure thread safety.

The order must be consistent when traversed both forwards and backwards.

Nested Class Summary

Nested Classes | Modifier and Type | Interface | Description | | --- | --- | --- | | static class | ShuffleOrder.DefaultShuffleOrder | Deprecated.

The default ShuffleOrder implementation for random shuffle order. | | static class | ShuffleOrder.UnshuffledShuffleOrder | Deprecated.

A ShuffleOrder implementation which does not shuffle. |

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ShuffleOrder | cloneAndClear() | Deprecated.

Returns a copy of the shuffle order with all elements removed. | | ShuffleOrder | cloneAndInsert​(int insertionIndex, int insertionCount) | Deprecated.

Returns a copy of the shuffle order with newly inserted elements. | | ShuffleOrder | cloneAndRemove​(int indexFrom, int indexToExclusive) | Deprecated.

Returns a copy of the shuffle order with a range of elements removed. | | int | getFirstIndex() | Deprecated.

Returns the first index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty. | | int | getLastIndex() | Deprecated.

Returns the last index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty. | | int | getLength() | Deprecated.

Returns length of shuffle order. | | int | getNextIndex​(int index) | Deprecated.

Returns the next index in the shuffle order. | | int | getPreviousIndex​(int index) | Deprecated.

Returns the previous index in the shuffle order. |

Method Detail

- 

getLength

int getLength()

Deprecated.

Returns length of shuffle order.

- 

getNextIndex

int getNextIndex​(int index)

Deprecated.

Returns the next index in the shuffle order. Parameters:index - An index.Returns:The index after index, or C.INDEX_UNSET if index is the last element.

- 

getPreviousIndex

int getPreviousIndex​(int index)

Deprecated.

Returns the previous index in the shuffle order. Parameters:index - An index.Returns:The index before index, or C.INDEX_UNSET if index is the first element.

- 

getLastIndex

int getLastIndex()

Deprecated.

Returns the last index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty.

- 

getFirstIndex

int getFirstIndex()

Deprecated.

Returns the first index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty.

- 

cloneAndInsert

[ShuffleOrder](ShuffleOrder.html "interface in com.google.android.exoplayer2.source")cloneAndInsert​(int insertionIndex,
                            int insertionCount)

Deprecated.

Returns a copy of the shuffle order with newly inserted elements. Parameters:insertionIndex - The index in the unshuffled order at which elements are inserted.insertionCount - The number of elements inserted at insertionIndex.Returns:A copy of this ShuffleOrder with newly inserted elements.

- 

cloneAndRemove

[ShuffleOrder](ShuffleOrder.html "interface in com.google.android.exoplayer2.source")cloneAndRemove​(int indexFrom,
                            int indexToExclusive)

Deprecated.

Returns a copy of the shuffle order with a range of elements removed. Parameters:indexFrom - The starting index in the unshuffled order of the range to remove.indexToExclusive - The smallest index (must be greater or equal to indexFrom) that will not be removed.Returns:A copy of this ShuffleOrder without the elements in the removed range.

- 

cloneAndClear

[ShuffleOrder](ShuffleOrder.html "interface in com.google.android.exoplayer2.source")cloneAndClear()

Deprecated.

Returns a copy of the shuffle order with all elements removed.