Java org.apache.commons.collections.buffer CircularFifoBuffer fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.collections.buffer CircularFifoBuffer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.collections.buffer CircularFifoBuffer.

The text is from its open source code.

Constructor

CircularFifoBuffer(int size)
Constructor that creates a buffer with the specified size.
CircularFifoBuffer(Collection coll)
Constructor that creates a buffer from the specified collection.
CircularFifoBuffer()
Constructor that creates a buffer with the default size of 32.

Method

booleanadd(Object element)
If the buffer is full, the least recently added element is discarded so that a new element can be inserted.
voidclear()
Clears this buffer.
Objectget()
Returns the least recently inserted element in this buffer.
booleanisEmpty()
Returns true if this buffer is empty; false otherwise.
Iteratoriterator()
Returns an iterator over this buffer's elements.
Objectremove()
Removes the least recently inserted element from this buffer.
intsize()
Returns the number of elements stored in the buffer.
T[]toArray(T[] a)