|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.floodlightcontroller.debugevent.CircularBuffer<T>
public class CircularBuffer<T>
Field Summary | |
---|---|
protected static org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
CircularBuffer(int capacity)
|
Method Summary | |
---|---|
T |
add(T e)
Adding an element to the circular buffer implies adding the element to the tail of the deque. |
java.util.ArrayList<T> |
addAll(java.util.ArrayList<T> elist,
int uptoIndex)
The basic idea here is that an ArrayList has been passed in, which may or may not have a size bigger that the actual number of elements that are meant to be flushed to the Circular Buffer. |
void |
clear()
Atomically removes all elements in the circular buffer |
java.util.Iterator<T> |
iterator()
Returns an iterator over the elements in the circular buffer in proper sequence. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger log
Constructor Detail |
---|
public CircularBuffer(int capacity)
Method Detail |
---|
public T add(T e)
e
- the element to be added
public java.util.ArrayList<T> addAll(java.util.ArrayList<T> elist, int uptoIndex)
elist
- the ArrayList to flush into the circular buffer.uptoIndex
- flush starting from index 0 upto but not including
index 'uptoIndex'.
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public int size()
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |