Package org.apache.commons.collections.buffer


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
  • Classes
    Class
    Description
    Decorates another Buffer to provide additional behaviour.
    Decorates another Buffer to make BlockingBuffer.get() and BlockingBuffer.remove() block when the Buffer is empty.
    Decorates another Buffer to ensure a fixed maximum size.
    The BoundedFifoBuffer is a very efficient implementation of Buffer that is of a fixed size.
    CircularFifoBuffer is a first in first out buffer with a fixed size that replaces its oldest element if full.
    Decorates another Buffer to validate that additions match a specified predicate.
    Binary heap implementation of Buffer that provides for removal based on Comparator ordering.
    Decorates another Buffer to synchronize its behaviour for a multi-threaded environment.
    Decorates another Buffer to transform objects that are added.
    Decorates another Buffer to validate that elements added are of a specific type.
    UnboundedFifoBuffer is a very efficient implementation of Buffer that can grow to any size.
    Decorates another Buffer to ensure it can't be altered.