docs/doc/reference/com/google/android/exoplayer2/util/TimedValueQueue.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 classTimedValueQueue\<V\>extends[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.
A utility class to keep a queue of values with timestamps. This class is thread safe.
Constructors | Constructor | Description |
| --- | --- |
| TimedValueQueue() |
Deprecated.
|
| TimedValueQueue(int initialBufferSize) |
Deprecated.
Creates a TimedValueBuffer with the given initial buffer size. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | add(long timestamp, V value) |
Deprecated.
Associates the specified value with the specified timestamp.
|
| void | clear() |
Deprecated.
Removes all of the values.
|
| V | poll(long timestamp) |
Deprecated.
Returns the value with the closest timestamp to the given timestamp.
|
| V | pollFirst() |
Deprecated.
Removes and returns the first value in the queue, or null if the queue is empty.
|
| V | pollFloor(long timestamp) |
Deprecated.
Returns the value with the greatest timestamp which is less than or equal to the given timestamp.
|
| int | size() |
Deprecated.
Returns number of the values buffered. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public TimedValueQueue()
Deprecated.
-
public TimedValueQueue(int initialBufferSize)
Deprecated.
Creates a TimedValueBuffer with the given initial buffer size.
-
public void add(long timestamp,[V](TimedValueQueue.html "type parameter in TimedValueQueue")value)
Deprecated.
Associates the specified value with the specified timestamp. All new values should have a greater timestamp than the previously added values. Otherwise all values are removed before adding the new one.
-
public void clear()
Deprecated.
Removes all of the values.
-
public int size()
Deprecated.
Returns number of the values buffered.
-
@Nullable
public[V](TimedValueQueue.html "type parameter in TimedValueQueue")pollFirst()
Deprecated.
Removes and returns the first value in the queue, or null if the queue is empty.
-
@Nullable
public[V](TimedValueQueue.html "type parameter in TimedValueQueue")pollFloor(long timestamp)
Deprecated.
Returns the value with the greatest timestamp which is less than or equal to the given timestamp. Removes all older values and the returned one from the buffer.
Parameters:timestamp - The timestamp value.Returns:The value with the greatest timestamp which is less than or equal to the given timestamp or null if there is no such value.See Also:poll(long)
-
@Nullable
public[V](TimedValueQueue.html "type parameter in TimedValueQueue")poll(long timestamp)
Deprecated.
Returns the value with the closest timestamp to the given timestamp. Removes all older values including the returned one from the buffer.
Parameters:timestamp - The timestamp value.Returns:The value with the closest timestamp or null if the buffer is empty.See Also:pollFloor(long)