|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.excalibur.collections.VariableSizeBuffer
VariableSizeBuffer is a very efficient buffer implementation. According to performance testing, it exhibits a constant access time, but it also outperforms ArrayList when used for the same purpose.
Field Summary | |
protected Object[] |
m_buffer
Deprecated. |
protected int |
m_head
Deprecated. |
protected int |
m_tail
Deprecated. |
Constructor Summary | |
VariableSizeBuffer()
Deprecated. Initialize the VariableSizeBuffer with the default number of elements. |
|
VariableSizeBuffer(int size)
Deprecated. Initialize the VariableSizeBuffer with the specified number of elements. |
Method Summary | |
void |
add(Object o)
Deprecated. Add an object into the buffer |
boolean |
isEmpty()
Deprecated. Tests to see if the CircularBuffer is empty. |
Object |
remove()
Deprecated. Removes the next object from the buffer |
int |
size()
Deprecated. Returns the number of elements stored in the buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Object[] m_buffer
protected int m_head
protected int m_tail
Constructor Detail |
public VariableSizeBuffer(int size)
public VariableSizeBuffer()
new VariableSizeBuffer( 32 );
Method Detail |
public final boolean isEmpty()
isEmpty
in interface Buffer
public final int size()
size
in interface Buffer
public final void add(Object o)
add
in interface Buffer
public Object remove()
remove
in interface Buffer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |