docs/doc/reference/com/google/android/exoplayer2/util/LongArray.html
Package com.google.android.exoplayer2.util
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classLongArrayextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
An append-only, auto-growing long[].
Constructors | Constructor | Description |
| --- | --- |
| LongArray() |
Deprecated.
|
| LongArray(int initialCapacity) |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | add(long value) |
Deprecated.
Appends a value.
|
| long | get(int index) |
Deprecated.
Returns the value at a specified index.
|
| int | size() |
Deprecated.
Returns the current size of the array.
|
| long[] | toArray() |
Deprecated.
Copies the current values into a newly allocated primitive array. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public LongArray()
Deprecated.
-
public LongArray(int initialCapacity)
Deprecated.
Parameters:initialCapacity - The initial capacity of the array.
-
public void add(long value)
Deprecated.
Appends a value.
Parameters:value - The value to append.
-
public long get(int index)
Deprecated.
Returns the value at a specified index.
Parameters:index - The index.Returns:The corresponding value.Throws:IndexOutOfBoundsException - If the index is less than zero, or greater than or equal to size().
-
public int size()
Deprecated.
Returns the current size of the array.
-
public long[] toArray()
Deprecated.
Copies the current values into a newly allocated primitive array. Returns:The primitive array containing the copied values.