public class CircularIntBuffer
extends java.lang.Object
Constructor and Description |
---|
CircularIntBuffer(int maxSize)
Create a new CircularIntBuffer that can grow to a given maxSize.
|
Modifier and Type | Method and Description |
---|---|
int |
peek()
Get the head value.
|
int |
peek(int offset)
Get the element at an offset of the head.
|
void |
push(int value)
Push a value into the buffer overriding the oldest element when exceeding max size.
|
int |
size()
Get current size of the buffer.
|
public CircularIntBuffer(int maxSize)
public void push(int value)
public int peek(int offset)
public int peek()
public int size()