Back to Exoplayer

ShuffleOrder.UnshuffledShuffleOrder (ExoPlayer library)

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

latest6.2 KB
Original Source

Package com.google.android.exoplayer2.source

Class ShuffleOrder.UnshuffledShuffleOrder

  • java.lang.Object

    • com.google.android.exoplayer2.source.ShuffleOrder.UnshuffledShuffleOrder
  • All Implemented Interfaces:ShuffleOrderEnclosing interface:ShuffleOrder


public static final classShuffleOrder.UnshuffledShuffleOrderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ShuffleOrder](ShuffleOrder.html "interface in com.google.android.exoplayer2.source")

A ShuffleOrder implementation which does not shuffle.

Nested Class Summary

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.source.ShuffleOrder

ShuffleOrder.DefaultShuffleOrder, ShuffleOrder.UnshuffledShuffleOrder

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | UnshuffledShuffleOrder​(int length) | Creates an instance with a specified length. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ShuffleOrder | cloneAndClear() | Returns a copy of the shuffle order with all elements removed. | | ShuffleOrder | cloneAndInsert​(int insertionIndex, int insertionCount) | Returns a copy of the shuffle order with newly inserted elements. | | ShuffleOrder | cloneAndRemove​(int indexFrom, int indexToExclusive) | Returns a copy of the shuffle order with a range of elements removed. | | int | getFirstIndex() | Returns the first index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty. | | int | getLastIndex() | Returns the last index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty. | | int | getLength() | Returns length of shuffle order. | | int | getNextIndex​(int index) | Returns the next index in the shuffle order. | | int | getPreviousIndex​(int index) | Returns the previous index in the shuffle order. |

- 

Methods inherited from class java.lang.Object

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

Constructor Detail

- 

UnshuffledShuffleOrder

public UnshuffledShuffleOrder​(int length)

Creates an instance with a specified length. Parameters:length - The length of the shuffle order.

Method Detail

- 

getLength

public int getLength()

Description copied from interface: ShuffleOrder

Returns length of shuffle order. Specified by:getLength in interface ShuffleOrder

- 

getNextIndex

public int getNextIndex​(int index)

Description copied from interface: ShuffleOrder

Returns the next index in the shuffle order. Specified by:getNextIndex in interface ShuffleOrderParameters:index - An index.Returns:The index after index, or C.INDEX_UNSET if index is the last element.

- 

getPreviousIndex

public int getPreviousIndex​(int index)

Description copied from interface: ShuffleOrder

Returns the previous index in the shuffle order. Specified by:getPreviousIndex in interface ShuffleOrderParameters:index - An index.Returns:The index before index, or C.INDEX_UNSET if index is the first element.

- 

getLastIndex

public int getLastIndex()

Description copied from interface: ShuffleOrder

Returns the last index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty. Specified by:getLastIndex in interface ShuffleOrder

- 

getFirstIndex

public int getFirstIndex()

Description copied from interface: ShuffleOrder

Returns the first index in the shuffle order, or C.INDEX_UNSET if the shuffle order is empty. Specified by:getFirstIndex in interface ShuffleOrder

- 

cloneAndInsert

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

Description copied from interface: ShuffleOrder

Returns a copy of the shuffle order with newly inserted elements. Specified by:cloneAndInsert in interface ShuffleOrderParameters: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

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

Description copied from interface: ShuffleOrder

Returns a copy of the shuffle order with a range of elements removed. Specified by:cloneAndRemove in interface ShuffleOrderParameters: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

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

Description copied from interface: ShuffleOrder

Returns a copy of the shuffle order with all elements removed. Specified by:cloneAndClear in interface ShuffleOrder