scolebourne 2003/11/29 10:14:20
Modified: collections/src/java/org/apache/commons/collections/buffer
BoundedFifoBuffer.java
collections/src/java/org/apache/commons/collections
BoundedCollection.java CollectionUtils.java
BoundedFifoBuffer.java
collections/src/java/org/apache/commons/collections/collection
UnmodifiableBoundedCollection.java
collections/src/java/org/apache/commons/collections/decorators
UnmodifiableBoundedCollection.java
collections/src/test/org/apache/commons/collections/buffer
TestBoundedFifoBuffer2.java
collections/src/test/org/apache/commons/collections
TestBoundedFifoBuffer2.java
Removed: collections/src/java/org/apache/commons/collections/collection
BoundedCollection.java
Log:
Refactor BoundedCollection interface to main package
All interfaces should be in main package
Revision Changes Path
1.2 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java
Index: BoundedFifoBuffer.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/BoundedFifoBuffer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BoundedFifoBuffer.java 29 Nov 2003 18:04:57 -0000 1.1
+++ BoundedFifoBuffer.java 29 Nov 2003 18:14:20 -0000 1.2
@@ -63,10 +63,10 @@
import java.util.Iterator;
import java.util.NoSuchElementException;
+import org.apache.commons.collections.BoundedCollection;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.BufferOverflowException;
import org.apache.commons.collections.BufferUnderflowException;
-import org.apache.commons.collections.collection.BoundedCollection;
/**
* The BoundedFifoBuffer is a <strong>very</strong> efficient implementation of
1.6 +19 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/BoundedCollection.java
Index: BoundedCollection.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/BoundedCollection.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BoundedCollection.java 18 Nov 2003 22:50:44 -0000 1.5
+++ BoundedCollection.java 29 Nov 2003 18:14:20 -0000 1.6
@@ -57,6 +57,8 @@
*/
package org.apache.commons.collections;
+import java.util.Collection;
+
/**
* A BoundedCollection is a collection that is bounded in size.
* <p>
@@ -64,13 +66,26 @@
* maximum number of elements. This interface allows the querying of details
* associated with the maximum number of elements.
*
- * @deprecated TO BE DELETED BEFORE v3.0, moved to collection subpackage
* @since Commons Collections 3.0
* @version $Revision$ $Date$
*
* @author Herve Quiroz
* @author Stephen Colebourne
*/
-public interface BoundedCollection extends
org.apache.commons.collections.collection.BoundedCollection {
+public interface BoundedCollection extends Collection {
+ /**
+ * Returns true if this collection is full and no new elements can be added.
+ *
+ * @return <code>true</code> if the collection is full
+ */
+ boolean isFull();
+
+ /**
+ * Gets the maximum size of the collection (the bound).
+ *
+ * @return the maximum number of elements the collection can hold
+ */
+ int maxSize();
+
}
1.49 +2 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java
Index: CollectionUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- CollectionUtils.java 27 Nov 2003 22:55:16 -0000 1.48
+++ CollectionUtils.java 29 Nov 2003 18:14:20 -0000 1.49
@@ -69,7 +69,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.collections.collection.BoundedCollection;
import org.apache.commons.collections.collection.PredicatedCollection;
import org.apache.commons.collections.collection.SynchronizedCollection;
import org.apache.commons.collections.collection.TransformedCollection;
1.13 +2 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/BoundedFifoBuffer.java
Index: BoundedFifoBuffer.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/BoundedFifoBuffer.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- BoundedFifoBuffer.java 29 Nov 2003 18:04:57 -0000 1.12
+++ BoundedFifoBuffer.java 29 Nov 2003 18:14:20 -0000 1.13
@@ -63,8 +63,6 @@
import java.util.Iterator;
import java.util.NoSuchElementException;
-import org.apache.commons.collections.collection.BoundedCollection;
-
/**
* The BoundedFifoBuffer is a <strong>very</strong> efficient implementation of
* Buffer that does not alter the size of the buffer at runtime.
1.3 +4 -2
jakarta-commons/collections/src/java/org/apache/commons/collections/collection/UnmodifiableBoundedCollection.java
Index: UnmodifiableBoundedCollection.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/collection/UnmodifiableBoundedCollection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- UnmodifiableBoundedCollection.java 18 Nov 2003 22:50:44 -0000 1.2
+++ UnmodifiableBoundedCollection.java 29 Nov 2003 18:14:20 -0000 1.3
@@ -59,6 +59,8 @@
import java.util.Collection;
+import org.apache.commons.collections.BoundedCollection;
+
/**
* <code>UnmodifiableBoundedCollection</code> decorates another
<code>BoundedCollection</code>
* to ensure it can't be altered.
1.7 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/decorators/UnmodifiableBoundedCollection.java
Index: UnmodifiableBoundedCollection.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/decorators/UnmodifiableBoundedCollection.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- UnmodifiableBoundedCollection.java 18 Nov 2003 22:50:44 -0000 1.6
+++ UnmodifiableBoundedCollection.java 29 Nov 2003 18:14:20 -0000 1.7
@@ -59,7 +59,7 @@
import java.util.Collection;
-import org.apache.commons.collections.collection.BoundedCollection;
+import org.apache.commons.collections.BoundedCollection;
/**
* <code>UnmodifiableBoundedCollection</code> decorates another
<code>BoundedCollection</code>
1.2 +3 -3
jakarta-commons/collections/src/test/org/apache/commons/collections/buffer/TestBoundedFifoBuffer2.java
Index: TestBoundedFifoBuffer2.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/buffer/TestBoundedFifoBuffer2.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestBoundedFifoBuffer2.java 29 Nov 2003 18:04:56 -0000 1.1
+++ TestBoundedFifoBuffer2.java 29 Nov 2003 18:14:20 -0000 1.2
@@ -62,9 +62,9 @@
import junit.framework.Test;
+import org.apache.commons.collections.BoundedCollection;
import org.apache.commons.collections.BufferOverflowException;
import org.apache.commons.collections.BulkTest;
-import org.apache.commons.collections.collection.BoundedCollection;
/**
* Runs tests against a full BoundedFifoBuffer, since many of the algorithms
1.8 +2 -4
jakarta-commons/collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java
Index: TestBoundedFifoBuffer2.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestBoundedFifoBuffer2.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestBoundedFifoBuffer2.java 18 Nov 2003 22:51:19 -0000 1.7
+++ TestBoundedFifoBuffer2.java 29 Nov 2003 18:14:20 -0000 1.8
@@ -62,8 +62,6 @@
import junit.framework.Test;
-import org.apache.commons.collections.collection.BoundedCollection;
-
/**
* Runs tests against a full BoundedFifoBuffer, since many of the algorithms
* differ depending on whether the fifo is full or not.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]