E - the generic Object to be storedpublic class RingBuffer<E> extends Object
| Constructor and Description |
|---|
RingBuffer(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
boolean |
put(E element)
add new element
|
int |
put(E[] newElements,
int length) |
int |
remainingCapacity() |
void |
reset()
clear all data and resets buffer
|
E |
take() |
int |
take(E[] into,
int length) |
public int available()
public boolean put(E element)
element - new elementpublic int put(E[] newElements, int length)
newElements - new values to be addedlength - number of elements to be writtenpublic int remainingCapacity()
public void reset()
public E take()
public int take(E[] into, int length)
into - container to be written intolength - maximum length to be readCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.