git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-05-15 12:33:23 +00:00
parent b13cb3b3b4
commit fbe5ab65e5
8 changed files with 21 additions and 8 deletions

View File

@ -35,7 +35,7 @@ import org.apache.commons.collections.BufferUnderflowException;
* order that they arrive.
*
* @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.4 $ $Date: 2004/05/15 12:33:23 $
*
* @author Stephen Colebourne
* @author Janek Bogucki
@ -47,6 +47,7 @@ public class BlockingBuffer extends SynchronizedBuffer {
* Factory method to create a blocking buffer.
*
* @param buffer the buffer to decorate, must not be null
* @return a new blocking Buffer
* @throws IllegalArgumentException if buffer is null
*/
public static Buffer decorate(Buffer buffer) {

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.collection.PredicatedCollection;
* is thrown.
*
* @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.4 $ $Date: 2004/05/15 12:33:23 $
*
* @author Stephen Colebourne
* @author Paul Jack
@ -42,6 +42,7 @@ public class PredicatedBuffer extends PredicatedCollection implements Buffer {
*
* @param buffer the buffer to decorate, must not be null
* @param predicate the predicate to use for validation, must not be null
* @return a new predicated Buffer
* @throws IllegalArgumentException if buffer or predicate is null
* @throws IllegalArgumentException if the buffer contains invalid elements
*/

View File

@ -50,7 +50,7 @@ import org.apache.commons.collections.BufferUnderflowException;
* </pre>
*
* @since Commons Collections 3.0 (previously BinaryHeap v1.0)
* @version $Revision: 1.4 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.5 $ $Date: 2004/05/15 12:33:23 $
*
* @author Peter Donald
* @author Ram Chidambaram
@ -230,6 +230,7 @@ public class PriorityBuffer extends AbstractCollection implements Buffer {
* The element added will be sorted according to the comparator in use.
*
* @param element the element to be added
* @return true always
*/
public boolean add(Object element) {
if (isAtCapacity()) {

View File

@ -25,7 +25,7 @@ import org.apache.commons.collections.collection.SynchronizedCollection;
* Methods are synchronized, then forwarded to the decorated buffer.
*
* @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.4 $ $Date: 2004/05/15 12:33:23 $
*
* @author Stephen Colebourne
*/
@ -35,6 +35,7 @@ public class SynchronizedBuffer extends SynchronizedCollection implements Buffer
* Factory method to create a synchronized buffer.
*
* @param buffer the buffer to decorate, must not be null
* @return a new synchronized Buffer
* @throws IllegalArgumentException if buffer is null
*/
public static Buffer decorate(Buffer buffer) {

View File

@ -28,7 +28,7 @@ import org.apache.commons.collections.collection.TransformedCollection;
* use the Integer form to remove objects.
*
* @since Commons Collections 3.0
* @version $Revision: 1.3 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.4 $ $Date: 2004/05/15 12:33:23 $
*
* @author Stephen Colebourne
*/
@ -42,6 +42,7 @@ public class TransformedBuffer extends TransformedCollection implements Buffer {
*
* @param buffer the buffer to decorate, must not be null
* @param transformer the transformer to use for conversion, must not be null
* @return a new transformed Buffer
* @throws IllegalArgumentException if buffer or transformer is null
*/
public static Buffer decorate(Buffer buffer, Transformer transformer) {

View File

@ -27,7 +27,7 @@ import org.apache.commons.collections.functors.InstanceofPredicate;
* collection, an IllegalArgumentException is thrown.
*
* @since Commons Collections 3.0
* @version $Revision: 1.4 $ $Date: 2004/05/07 23:28:38 $
* @version $Revision: 1.5 $ $Date: 2004/05/15 12:33:23 $
*
* @author Stephen Colebourne
* @author Matthew Hawthorne
@ -42,6 +42,7 @@ public class TypedBuffer {
*
* @param buffer the buffer to decorate, must not be null
* @param type the type to allow into the buffer, must not be null
* @return a new typed Buffer
* @throws IllegalArgumentException if buffer or type is null
* @throws IllegalArgumentException if the buffer contains invalid elements
*/
@ -53,6 +54,7 @@ public class TypedBuffer {
* Restrictive constructor.
*/
protected TypedBuffer() {
super();
}
}

View File

@ -44,7 +44,7 @@ import org.apache.commons.collections.BufferUnderflowException;
* This buffer prevents null objects from being added.
*
* @since Commons Collections 3.0 (previously in main package v2.1)
* @version $Revision: 1.7 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.8 $ $Date: 2004/05/15 12:33:23 $
*
* @author Avalon
* @author Federico Barbieri
@ -54,8 +54,11 @@ import org.apache.commons.collections.BufferUnderflowException;
*/
public class UnboundedFifoBuffer extends AbstractCollection implements Buffer {
/** The array of objects in the buffer. */
protected Object[] buffer;
/** The current head index. */
protected int head;
/** The current tail index. */
protected int tail;
/**

View File

@ -26,7 +26,7 @@ import org.apache.commons.collections.iterators.UnmodifiableIterator;
* Decorates another <code>Buffer</code> to ensure it can't be altered.
*
* @since Commons Collections 3.0
* @version $Revision: 1.5 $ $Date: 2004/02/18 00:58:18 $
* @version $Revision: 1.6 $ $Date: 2004/05/15 12:33:23 $
*
* @author Stephen Colebourne
*/
@ -34,8 +34,11 @@ public final class UnmodifiableBuffer extends AbstractBufferDecorator implements
/**
* Factory method to create an unmodifiable buffer.
* <p>
* If the buffer passed in is already unmodifiable, it is returned.
*
* @param buffer the buffer to decorate, must not be null
* @return an unmodifiable Buffer
* @throws IllegalArgumentException if buffer is null
*/
public static Buffer decorate(Buffer buffer) {