Package com.google.android.exoplayer2.util

## Class IntArrayQueue

- java.lang.Object
- - com.google.android.exoplayer2.util.IntArrayQueue

-     public final class IntArrayQueue
      extends Object

  Array-based unbounded queue for int primitives with amortized O(1) add and remove.

  Use this class instead of a `Deque` to avoid boxing int primitives to `Integer` instances.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IntArrayQueue()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(int value)` | Add a new item to the queue.
    `int` | `capacity()` | Returns the length of the backing array.
    `void` | `clear()` | Clears the queue.
    `boolean` | `isEmpty()` | Returns whether the queue is empty.
    `int` | `remove()` | Remove an item from the queue.
    `int` | `size()` | Returns the number of items in the queue.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### IntArrayQueue

          public IntArrayQueue()

  - ### Method Detail

    - #### add

          public void add​(int value)

      Add a new item to the queue.

    - #### remove

          public int remove()

      Remove an item from the queue.
      Throws:
        `NoSuchElementException` - if the queue is empty.

    - #### size

          public int size()

      Returns the number of items in the queue.

    - #### isEmpty

          public boolean isEmpty()

      Returns whether the queue is empty.

    - #### clear

          public void clear()

      Clears the queue.

    - #### capacity

          public int capacity()

      Returns the length of the backing array.