|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.hivecell.hive.support.ImageRingBuffer
This class is a fixed size data structure that contains serializable images. If the ringbuffer is full and a new image is added, the least recently added image is removed.
Field Summary | |
protected int |
highval
The index of the most recent image in the buffer. |
protected SerializableImage[] |
store
The array where the images are stored. |
Constructor Summary | |
ImageRingBuffer(int size)
Constructs a ImageRingBuffer of size; |
Method Summary | |
int |
addElement(SerializableImage si)
Add an image to the buffer and return the index it was assigned. |
boolean |
containsIndex(int index)
return whether the RingBuffer contains this index |
int |
getEarliestIndex()
Get the index of the earliest image still in the buffer |
SerializableImage |
getElement(int i)
Return the element with index i. |
int |
getLatestIndex()
Get the index of the most recent image. |
int |
getSize()
Get the size of the ringbuffer. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected int highval
protected SerializableImage[] store
Constructor Detail |
public ImageRingBuffer(int size)
Method Detail |
public int getSize()
public int getLatestIndex()
public int getEarliestIndex()
public boolean containsIndex(int index)
public SerializableImage getElement(int i)
public int addElement(SerializableImage si)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |