| Package | Description |
|---|---|
| org.apache.commons.collections |
This package contains the interfaces and utilities shared across all the subpackages of this component.
|
| org.apache.commons.collections.buffer |
This package contains implementations of the
Buffer interface. |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayStack<E>
An implementation of the
Stack API that is based on an
ArrayList instead of a Vector, so it is not
synchronized to protect against multi-threaded access. |
| Modifier and Type | Field and Description |
|---|---|
static Buffer<Object> |
BufferUtils.EMPTY_BUFFER
An empty unmodifiable buffer.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> Buffer<E> |
BufferUtils.blockingBuffer(Buffer<E> buffer)
|
static <E> Buffer<E> |
BufferUtils.blockingBuffer(Buffer<E> buffer,
long timeoutMillis)
|
static <E> Buffer<E> |
BufferUtils.boundedBuffer(Buffer<E> buffer,
int maximumSize)
Returns a synchronized buffer backed by the given buffer that will
block on
Collection.add(Object) and
Collection.addAll(java.util.Collection) until enough object(s) are
removed from the buffer to allow the object(s) to be added and still
maintain the maximum size. |
static <E> Buffer<E> |
BufferUtils.boundedBuffer(Buffer<E> buffer,
int maximumSize,
long timeoutMillis)
Returns a synchronized buffer backed by the given buffer that will
block on
Collection.add(Object) and
Collection.addAll(java.util.Collection) until enough object(s) are
removed from the buffer to allow the object(s) to be added and still
maintain the maximum size or the timeout expires. |
static <E> Buffer<E> |
BufferUtils.emptyBuffer()
Get an empty
Buffer. |
static <E> Buffer<E> |
BufferUtils.predicatedBuffer(Buffer<E> buffer,
Predicate<? super E> predicate)
Returns a predicated (validating) buffer backed by the given buffer.
|
static <E> Buffer<E> |
BufferUtils.synchronizedBuffer(Buffer<E> buffer)
Returns a synchronized buffer backed by the given buffer.
|
static <E> Buffer<E> |
BufferUtils.transformingBuffer(Buffer<E> buffer,
Transformer<? super E,? extends E> transformer)
Returns a transformed buffer backed by the given buffer.
|
static <E> Buffer<E> |
BufferUtils.unmodifiableBuffer(Buffer<E> buffer)
Returns an unmodifiable buffer backed by the given buffer.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> Buffer<E> |
BufferUtils.blockingBuffer(Buffer<E> buffer)
|
static <E> Buffer<E> |
BufferUtils.blockingBuffer(Buffer<E> buffer,
long timeoutMillis)
|
static <E> Buffer<E> |
BufferUtils.boundedBuffer(Buffer<E> buffer,
int maximumSize)
Returns a synchronized buffer backed by the given buffer that will
block on
Collection.add(Object) and
Collection.addAll(java.util.Collection) until enough object(s) are
removed from the buffer to allow the object(s) to be added and still
maintain the maximum size. |
static <E> Buffer<E> |
BufferUtils.boundedBuffer(Buffer<E> buffer,
int maximumSize,
long timeoutMillis)
Returns a synchronized buffer backed by the given buffer that will
block on
Collection.add(Object) and
Collection.addAll(java.util.Collection) until enough object(s) are
removed from the buffer to allow the object(s) to be added and still
maintain the maximum size or the timeout expires. |
static <E> Buffer<E> |
BufferUtils.predicatedBuffer(Buffer<E> buffer,
Predicate<? super E> predicate)
Returns a predicated (validating) buffer backed by the given buffer.
|
static <E> Buffer<E> |
BufferUtils.synchronizedBuffer(Buffer<E> buffer)
Returns a synchronized buffer backed by the given buffer.
|
static <E> Buffer<E> |
BufferUtils.transformingBuffer(Buffer<E> buffer,
Transformer<? super E,? extends E> transformer)
Returns a transformed buffer backed by the given buffer.
|
static <E> Buffer<E> |
BufferUtils.unmodifiableBuffer(Buffer<E> buffer)
Returns an unmodifiable buffer backed by the given buffer.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBufferDecorator<E>
Decorates another
Buffer to provide additional behaviour. |
class |
BlockingBuffer<E>
Decorates another
Buffer to make BlockingBuffer.get() and
BlockingBuffer.remove() block when the Buffer is empty. |
class |
BoundedBuffer<E>
Decorates another
Buffer to ensure a fixed maximum size. |
class |
BoundedFifoBuffer<E>
The
BoundedFifoBuffer is a very efficient implementation of a
Buffer with a fixed size. |
class |
CircularFifoBuffer<E>
CircularFifoBuffer is a first in first out buffer with a fixed size that
replaces its oldest element if full.
|
class |
PredicatedBuffer<E>
Decorates another
Buffer to validate that additions
match a specified predicate. |
class |
PriorityBuffer<E>
Binary heap implementation of
Buffer that provides for
removal based on Comparator ordering. |
class |
SynchronizedBuffer<E>
Decorates another
Buffer to synchronize its behaviour
for a multi-threaded environment. |
class |
TransformedBuffer<E>
Decorates another
Buffer to transform objects that are added. |
class |
UnboundedFifoBuffer<E>
UnboundedFifoBuffer is a very efficient implementation of
Buffer that can grow to any size. |
class |
UnmodifiableBuffer<E>
Decorates another
Buffer to ensure it can't be altered. |
| Modifier and Type | Method and Description |
|---|---|
protected Buffer<E> |
AbstractBufferDecorator.decorated()
Gets the buffer being decorated.
|
protected Buffer<E> |
SynchronizedBuffer.decorated()
Gets the buffer being decorated.
|
protected Buffer<E> |
PredicatedBuffer.decorated()
Gets the buffer being decorated.
|
protected Buffer<E> |
TransformedBuffer.getBuffer()
Gets the decorated buffer.
|
static <E> Buffer<E> |
UnmodifiableBuffer.unmodifiableBuffer(Buffer<E> buffer)
Factory method to create an unmodifiable buffer.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> BlockingBuffer<E> |
BlockingBuffer.blockingBuffer(Buffer<E> buffer)
Factory method to create a blocking buffer.
|
static <E> BlockingBuffer<E> |
BlockingBuffer.blockingBuffer(Buffer<E> buffer,
long timeoutMillis)
Factory method to create a blocking buffer with a timeout value.
|
static <E> BoundedBuffer<E> |
BoundedBuffer.boundedBuffer(Buffer<E> buffer,
int maximumSize)
Factory method to create a bounded buffer.
|
static <E> BoundedBuffer<E> |
BoundedBuffer.boundedBuffer(Buffer<E> buffer,
int maximumSize,
long timeout)
Factory method to create a bounded buffer that blocks for a maximum
amount of time.
|
static <E> PredicatedBuffer<E> |
PredicatedBuffer.predicatedBuffer(Buffer<E> buffer,
Predicate<? super E> predicate)
Factory method to create a predicated (validating) buffer.
|
static <E> SynchronizedBuffer<E> |
SynchronizedBuffer.synchronizedBuffer(Buffer<E> buffer)
Factory method to create a synchronized buffer.
|
static <E> TransformedBuffer<E> |
TransformedBuffer.transformedBuffer(Buffer<E> buffer,
Transformer<? super E,? extends E> transformer)
Factory method to create a transforming buffer that will transform
existing contents of the specified buffer.
|
static <E> TransformedBuffer<E> |
TransformedBuffer.transformingBuffer(Buffer<E> buffer,
Transformer<? super E,? extends E> transformer)
Factory method to create a transforming buffer.
|
static <E> Buffer<E> |
UnmodifiableBuffer.unmodifiableBuffer(Buffer<E> buffer)
Factory method to create an unmodifiable buffer.
|
| Constructor and Description |
|---|
AbstractBufferDecorator(Buffer<E> buffer)
Constructor that wraps (not copies).
|
BlockingBuffer(Buffer<E> buffer)
Constructor that wraps (not copies).
|
BlockingBuffer(Buffer<E> buffer,
long timeoutMillis)
Constructor that wraps (not copies).
|
BoundedBuffer(Buffer<E> buffer,
int maximumSize,
long timeout)
Constructor that wraps (not copies) another buffer, making it bounded
waiting only up to a maximum amount of time.
|
PredicatedBuffer(Buffer<E> buffer,
Predicate<? super E> predicate)
Constructor that wraps (not copies).
|
SynchronizedBuffer(Buffer<E> buffer)
Constructor that wraps (not copies).
|
SynchronizedBuffer(Buffer<E> buffer,
Object lock)
Constructor that wraps (not copies).
|
TransformedBuffer(Buffer<E> buffer,
Transformer<? super E,? extends E> transformer)
Constructor that wraps (not copies).
|
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.