Android APIs
public class

CircularArray

extends Object
java.lang.Object
   ↳ android.support.v4.util.CircularArray<E>

Class Overview

A circular array implementation that provides O(1) random read and O(1) prepend and O(1) append.

Summary

Public Constructors
CircularArray()
Create a CircularArray with default capacity.
CircularArray(int minCapacity)
Create a CircularArray with capacity for at least minCapacity elements.
Public Methods
final void addFirst(E e)
final void addLast(E e)
final E get(int i)
final E getFirst()
final E getLast()
final boolean isEmpty()
final E popFirst()
final E popLast()
final int size()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CircularArray ()

Create a CircularArray with default capacity.

public CircularArray (int minCapacity)

Create a CircularArray with capacity for at least minCapacity elements.

Parameters
minCapacity The minimum capacity required for the circular array.

Public Methods

public final void addFirst (E e)

public final void addLast (E e)

public final E get (int i)

public final E getFirst ()

public final E getLast ()

public final boolean isEmpty ()

public final E popFirst ()

public final E popLast ()

public final int size ()