Package org.apache.commons.collections.buffer
This package contains implementations of the
Buffer interface.
The following implementations are provided in the package:
- PriorityBuffer - provides for removal based on a comparator ordering
- BoundedFifoBuffer - implements a buffer with a fixed size that throws exceptions when full
- CircularFifoBuffer - implements a buffer with a fixed size that discards oldest when full
- UnboundedFifoBuffer - implements a buffer that grows in size if necessary
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms elements added to the buffer
- Blocking - blocks on get and remove until an element is available
-
Class Summary Class Description AbstractBufferDecorator Decorates anotherBufferto provide additional behaviour.BlockingBuffer Decorates anotherBufferto makeBlockingBuffer.get()andBlockingBuffer.remove()block when theBufferis empty.BoundedBuffer Decorates anotherBufferto ensure a fixed maximum size.BoundedFifoBuffer The BoundedFifoBuffer is a very efficient implementation ofBufferthat is of a fixed size.CircularFifoBuffer CircularFifoBuffer is a first in first out buffer with a fixed size that replaces its oldest element if full.PredicatedBuffer Decorates anotherBufferto validate that additions match a specified predicate.PriorityBuffer Binary heap implementation ofBufferthat provides for removal based onComparatorordering.SynchronizedBuffer Decorates anotherBufferto synchronize its behaviour for a multi-threaded environment.TransformedBuffer Decorates anotherBufferto transform objects that are added.TypedBuffer Decorates anotherBufferto validate that elements added are of a specific type.UnboundedFifoBuffer UnboundedFifoBuffer is a very efficient implementation ofBufferthat can grow to any size.UnmodifiableBuffer Decorates anotherBufferto ensure it can't be altered.