| Home >> All >> org >> apache >> commons >> collections >> [ buffer Javadoc ] |
org.apache.commons.collections.buffer: Javadoc index of package org.apache.commons.collections.buffer.
Package Samples:
org.apache.commons.collections.buffer
Classes:
PriorityBuffer: Binary heap implementation of Buffer that provides for removal based on Comparator ordering. The removal order of a binary heap is based on either the natural sort order of its elements or a specified java.util.Comparator . The remove() 55 method always returns the first element as determined by the sort order. (The ascendingOrder flag in the constructors can be used to reverse the sort order, in which case remove() 55 will always remove the last element.) The removal order is not the same as the order of iteration; elements are returned by the iterator in no particular order. The add(Object) 55 ...
UnboundedFifoBuffer: UnboundedFifoBuffer is a very efficient buffer implementation. According to performance testing, it exhibits a constant access time, but it also outperforms ArrayList when used for the same purpose. The removal order of an UnboundedFifoBuffer is based on the insertion order; elements are removed in the same order in which they were added. The iteration order is the same as the removal order. The remove() 55 and get() 55 operations perform in constant time. The add(Object) 55 operation performs in amortized constant time. All other operations perform in linear time or worse. Note that this implementation ...
CircularFifoBuffer: CircularFifoBuffer is a first in first out buffer with a fixed size that replaces its oldest element if full. The removal order of a CircularFifoBuffer is based on the insertion order; elements are removed in the same order in which they were added. The iteration order is the same as the removal order. The add(Object) 55 , BoundedFifoBuffer.remove() 55 and BoundedFifoBuffer.get() 55 operations all perform in constant time. All other operations perform in linear time or worse. Note that this implementation is not synchronized. The following can be used to provide synchronized access to your CircularFifoBuffer ...
BoundedFifoBuffer: The BoundedFifoBuffer is a very efficient implementation of Buffer that does not alter the size of the buffer at runtime. The removal order of a BoundedFifoBuffer is based on the insertion order; elements are removed in the same order in which they were added. The iteration order is the same as the removal order. The add(Object) 55 , remove() 55 and get() 55 operations all perform in constant time. All other operations perform in linear time or worse. Note that this implementation is not synchronized. The following can be used to provide synchronized access to your BoundedFifoBuffer : Buffer fifo ...
BlockingBuffer: Decorates another Buffer to make get() 55 and remove() 55 block when the Buffer is empty. If either get or remove is called on an empty Buffer , the calling thread waits for notification that an add or addAll operation has completed. When one or more entries are added to an empty Buffer , all threads blocked in get or remove are notified. There is no guarantee that concurrent blocked get or remove requests will be "unblocked" and receive data in the order that they arrive. This class is Serializable from Commons Collections 3.1.
PredicatedBuffer: Decorates another Buffer to validate that additions match a specified predicate. This buffer exists to provide validation for the decorated buffer. It is normally created to decorate an empty buffer. If an object cannot be added to the buffer, an IllegalArgumentException is thrown. One usage would be to ensure that no null entries are added to the buffer. Buffer buffer = PredicatedBuffer.decorate(new UnboundedFifoBuffer(), NotNullPredicate.INSTANCE); This class is Serializable from Commons Collections 3.1.
TransformedBuffer: Decorates another Buffer to transform objects that are added. The add methods are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects. This class is Serializable from Commons Collections 3.1.
TestUnmodifiableBuffer: Extension of org.apache.commons.collections.collection.AbstractTestCollection for exercising the UnmodifiableBuffer implementation.
TestSynchronizedBuffer: Extension of org.apache.commons.collections.collection.AbstractTestCollection for exercising the SynchronizedBuffer implementation.
TestPredicatedBuffer: Extension of org.apache.commons.collections.collection.TestPredicatedCollection for exercising the PredicatedBuffer implementation.
TypedBuffer: Decorates another Buffer to validate that elements added are of a specific type. The validation of additions is performed via an instanceof test against a specified Class . If an object cannot be added to the collection, an IllegalArgumentException is thrown.
SynchronizedBuffer: Decorates another Buffer to synchronize its behaviour for a multi-threaded environment. Methods are synchronized, then forwarded to the decorated buffer. This class is Serializable from Commons Collections 3.1.
TestTransformedBuffer: Extension of TestBuffer for exercising the TransformedBuffer implementation.
TestBlockingBuffer: Extension of TestObject for exercising the BlockingBuffer implementation.
AbstractBufferDecorator: Decorates another Buffer to provide additional behaviour. Methods are forwarded directly to the decorated buffer.
UnmodifiableBuffer: Decorates another Buffer to ensure it can't be altered. This class is Serializable from Commons Collections 3.1.
TestBoundedFifoBuffer2: Runs tests against a full BoundedFifoBuffer, since many of the algorithms differ depending on whether the fifo is full or not.
TestUnboundedFifoBuffer: Test cases for UnboundedFifoBuffer.
TestCircularFifoBuffer: Test cases for CircularFifoBuffer.
TestBoundedFifoBuffer: Test cases for BoundedFifoBuffer.
TestPriorityBuffer: Tests the PriorityBuffer.
TestAll: Entry point for tests.
| Home | Contact Us | Privacy Policy | Terms of Service |