public class RingBufferIndices extends Object
Constructor and Description |
---|
RingBufferIndices(int capacity)
Create ring buffer of the given capacity.
|
Modifier and Type | Method and Description |
---|---|
int |
add()
Add a new item to the ring buffer.
|
void |
clear()
Clear the ring buffer.
|
int |
indexOf(int pos)
Convert a position in the ring buffer that is [0..size()] to an offset
in the array(s) containing the ring buffer items.
|
int |
size()
Return the current size of the ring buffer.
|
public RingBufferIndices(int capacity)
public int add()
public void clear()
public int size()
public int indexOf(int pos)