org.apache.avalon.excalibur.collections
インタフェース Buffer

既知の実装クラスの一覧:
FixedSizeBuffer, VariableSizeBuffer

public interface Buffer

A Buffer is an ordered list of objects, that does not support querying or direct access to the elements. It is basically a First In/First Out (FIFO) buffer. It is useful in both pooling and queue implementation code among other things.

導入されたバージョン:
4.0
バージョン:
CVS $Revision: 1.1 $ $Date: 2001/12/21 13:43:57 $
作成者:
Berin Loritsch

メソッドの概要
 void add(java.lang.Object o)
          Add an object into the buffer.
 boolean isEmpty()
          Tests to see if the CircularBuffer is empty.
 java.lang.Object remove()
          Removes the next object from the buffer.
 int size()
          Returns the number of elements stored in the buffer.
 

メソッドの詳細

isEmpty

public boolean isEmpty()
Tests to see if the CircularBuffer is empty.

size

public int size()
Returns the number of elements stored in the buffer.

add

public void add(java.lang.Object o)
Add an object into the buffer.
例外:
BufferOverflowException - if adding this element exceeds the buffer's capacity.

remove

public java.lang.Object remove()
Removes the next object from the buffer.
例外:
BufferUnderflowException - if the buffer is already empty


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."