scolebourne 2004/01/08 14:26:08
Modified: collections/src/java/org/apache/commons/collections/functors
PrototypeFactory.java
collections/src/java/org/apache/commons/collections
CollectionUtils.java PriorityQueue.java
OrderedMap.java DoubleOrderedMap.java
OrderedMapIterator.java DefaultMapBag.java
collections/src/java/org/apache/commons/collections/iterators
EntrySetMapIterator.java TransformIterator.java
IteratorEnumeration.java IteratorChain.java
ProxyIterator.java
collections/src/java/org/apache/commons/collections/map
ReferenceMap.java
collections/src/java/org/apache/commons/collections/set
ListOrderedSet.java
collections/src/java/org/apache/commons/collections/collection
TransformedCollection.java
collections/src/java/org/apache/commons/collections/bidimap
TreeBidiMap.java
collections/src/java/org/apache/commons/collections/bag
AbstractMapBag.java
Log:
Fixes to javadoc. Remove unecessary casts.
bug 25936, from Gary Gregory
Revision Changes Path
1.4 +2 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/functors/PrototypeFactory.java
Index: PrototypeFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/PrototypeFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PrototypeFactory.java 29 Dec 2003 01:18:23 -0000 1.3
+++ PrototypeFactory.java 8 Jan 2004 22:26:07 -0000 1.4
@@ -124,8 +124,6 @@
/**
* Constructor that performs no validation.
* Use <code>getInstance</code> if you want that.
- *
- * @param constantToReturn the constant to return each time
*/
private PrototypeFactory() {
}
1.54 +2 -4
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.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- CollectionUtils.java 5 Jan 2004 22:46:33 -0000 1.53
+++ CollectionUtils.java 8 Jan 2004 22:26:07 -0000 1.54
@@ -74,8 +74,6 @@
import org.apache.commons.collections.collection.TypedCollection;
import org.apache.commons.collections.collection.UnmodifiableBoundedCollection;
import org.apache.commons.collections.collection.UnmodifiableCollection;
-import org.apache.commons.collections.iterators.ArrayIterator;
-import org.apache.commons.collections.iterators.EnumerationIterator;
/**
* Provides utility methods and decorators for [EMAIL PROTECTED] Collection}
instances.
1.12 +4 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/PriorityQueue.java
Index: PriorityQueue.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/PriorityQueue.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PriorityQueue.java 6 Jan 2004 21:31:32 -0000 1.11
+++ PriorityQueue.java 8 Jan 2004 22:26:07 -0000 1.12
@@ -98,7 +98,7 @@
* Return element on top of heap but don't remove it.
*
* @return the element at top of heap
- * @throws NoSuchElementException if <code>isEmpty() == true</code>
+ * @throws java.util.NoSuchElementException if <code>isEmpty() == true</code>
*/
Object peek();
@@ -106,7 +106,7 @@
* Return element on top of heap and remove it.
*
* @return the element at top of heap
- * @throws NoSuchElementException if <code>isEmpty() == true</code>
+ * @throws java.util.NoSuchElementException if <code>isEmpty() == true</code>
*/
Object pop();
1.4 +4 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/OrderedMap.java
Index: OrderedMap.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/OrderedMap.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- OrderedMap.java 2 Dec 2003 23:51:49 -0000 1.3
+++ OrderedMap.java 8 Jan 2004 22:26:07 -0000 1.4
@@ -92,7 +92,7 @@
* Gets the first key currently in this map.
*
* @return the first key currently in this map
- * @throws NoSuchElementException if this map is empty
+ * @throws java.util.NoSuchElementException if this map is empty
*/
public Object firstKey();
@@ -100,7 +100,7 @@
* Gets the last key currently in this map.
*
* @return the last key currently in this map
- * @throws NoSuchElementException if this map is empty
+ * @throws java.util.NoSuchElementException if this map is empty
*/
public Object lastKey();
1.12 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/DoubleOrderedMap.java
Index: DoubleOrderedMap.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/DoubleOrderedMap.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- DoubleOrderedMap.java 6 Jan 2004 22:07:47 -0000 1.11
+++ DoubleOrderedMap.java 8 Jan 2004 22:26:07 -0000 1.12
@@ -535,7 +535,7 @@
* value if o1 > o2
*/
private static int compare(final Comparable o1, final Comparable o2) {
- return ((Comparable) o1).compareTo(o2);
+ return o1.compareTo(o2);
}
/**
1.2 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/OrderedMapIterator.java
Index: OrderedMapIterator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/OrderedMapIterator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- OrderedMapIterator.java 1 Dec 2003 22:48:59 -0000 1.1
+++ OrderedMapIterator.java 8 Jan 2004 22:26:07 -0000 1.2
@@ -80,7 +80,7 @@
* Gets the previous <em>key</em> from the <code>Map</code>.
*
* @return the previous key in the iteration
- * @throws NoSuchElementException if the iteration is finished
+ * @throws java.util.NoSuchElementException if the iteration is finished
*/
Object previous();
1.14 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java
Index: DefaultMapBag.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DefaultMapBag.java 24 Dec 2003 23:22:54 -0000 1.13
+++ DefaultMapBag.java 8 Jan 2004 22:26:07 -0000 1.14
@@ -198,7 +198,7 @@
Iterator i = other.uniqueSet().iterator();
while (i.hasNext()) {
Object current = i.next();
- boolean contains = getCount(current) >= ((Bag) other).getCount(current);
+ boolean contains = getCount(current) >= other.getCount(current);
result = result && contains;
}
return result;
1.5 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/EntrySetMapIterator.java
Index: EntrySetMapIterator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/EntrySetMapIterator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EntrySetMapIterator.java 1 Dec 2003 22:48:59 -0000 1.4
+++ EntrySetMapIterator.java 8 Jan 2004 22:26:07 -0000 1.5
@@ -112,7 +112,7 @@
* Gets the next <em>key</em> from the <code>Map</code>.
*
* @return the next key in the iteration
- * @throws NoSuchElementException if the iteration is finished
+ * @throws java.util.NoSuchElementException if the iteration is finished
*/
public Object next() {
last = (Map.Entry) iterator.next();
1.7 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/TransformIterator.java
Index: TransformIterator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/TransformIterator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TransformIterator.java 2 Nov 2003 16:29:12 -0000 1.6
+++ TransformIterator.java 8 Jan 2004 22:26:07 -0000 1.7
@@ -123,7 +123,7 @@
* occurs and the object from the iterator is returned directly.
*
* @return the next object
- * @throws NoSuchElementException if there are no more elements
+ * @throws java.util.NoSuchElementException if there are no more elements
*/
public Object next() {
return transform(iterator.next());
1.6 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorEnumeration.java
Index: IteratorEnumeration.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorEnumeration.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- IteratorEnumeration.java 28 Oct 2003 02:44:51 -0000 1.5
+++ IteratorEnumeration.java 8 Jan 2004 22:26:07 -0000 1.6
@@ -108,7 +108,7 @@
* Returns the next element from the underlying iterator.
*
* @return the next element from the underlying iterator.
- * @throws NoSuchElementException if the underlying iterator has no
+ * @throws java.util.NoSuchElementException if the underlying iterator has no
* more elements
*/
public Object nextElement() {
1.9 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java
Index: IteratorChain.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- IteratorChain.java 29 Dec 2003 16:07:53 -0000 1.8
+++ IteratorChain.java 8 Jan 2004 22:26:07 -0000 1.9
@@ -297,7 +297,7 @@
* Returns the next Object of the current Iterator
*
* @return Object from the current Iterator
- * @throws NoSuchElementException if all the Iterators are exhausted
+ * @throws java.util.NoSuchElementException if all the Iterators are exhausted
*/
public Object next() {
lockChain();
1.8 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ProxyIterator.java
Index: ProxyIterator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ProxyIterator.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ProxyIterator.java 4 Jan 2004 18:04:16 -0000 1.7
+++ ProxyIterator.java 8 Jan 2004 22:26:07 -0000 1.8
@@ -111,7 +111,7 @@
* Returns the next element from the underlying iterator.
*
* @return the next element from the underlying iterator
- * @throws NoSuchElementException if the underlying iterator
+ * @throws java.util.NoSuchElementException if the underlying iterator
* raises it because it has no more elements
*/
public Object next() {
1.8 +4 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java
Index: ReferenceMap.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ReferenceMap.java 5 Jan 2004 22:15:14 -0000 1.7
+++ ReferenceMap.java 8 Jan 2004 22:26:07 -0000 1.8
@@ -353,7 +353,7 @@
/**
* Reads the contents of this object from the given input stream.
*
- * @param inp the input stream to read from
+ * @param in the input stream to read from
* @throws IOException if the stream raises it
* @throws ClassNotFoundException if the stream raises it
*/
@@ -640,7 +640,7 @@
public void clear() {
Arrays.fill(table, null);
size = 0;
- while (queue.poll() != null) {}; // drain the queue
+ while (queue.poll() != null) {} // drain the queue
}
1.4 +4 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/set/ListOrderedSet.java
Index: ListOrderedSet.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/set/ListOrderedSet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ListOrderedSet.java 25 Dec 2003 00:50:10 -0000 1.3
+++ ListOrderedSet.java 8 Jan 2004 22:26:07 -0000 1.4
@@ -214,7 +214,7 @@
setOrder.clear();
} else {
for (Iterator it = setOrder.iterator(); it.hasNext();) {
- Object object = (Object) it.next();
+ Object object = it.next();
if (collection.contains(object) == false) {
it.remove();
}
@@ -250,7 +250,7 @@
public boolean addAll(int index, Collection coll) {
boolean changed = false;
for (Iterator it = coll.iterator(); it.hasNext();) {
- Object object = (Object) it.next();
+ Object object = it.next();
if (contains(object) == false) {
collection.add(object);
setOrder.add(index, object);
1.2 +4 -4
jakarta-commons/collections/src/java/org/apache/commons/collections/collection/TransformedCollection.java
Index: TransformedCollection.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/collection/TransformedCollection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TransformedCollection.java 16 Nov 2003 00:05:47 -0000 1.1
+++ TransformedCollection.java 8 Jan 2004 22:26:07 -0000 1.2
@@ -121,7 +121,7 @@
* The transformer itself may throw an exception if necessary.
*
* @param object the object to transform
- * @throws the transformed object
+ * @return a transformed object
*/
protected Object transform(Object object) {
return transformer.transform(object);
@@ -133,7 +133,7 @@
* The transformer itself may throw an exception if necessary.
*
* @param coll the collection to transform
- * @throws the transformed object
+ * @return a transformed object
*/
protected Collection transform(Collection coll) {
List list = new ArrayList(coll.size());
1.8 +5 -5
jakarta-commons/collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java
Index: TreeBidiMap.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TreeBidiMap.java 2 Jan 2004 01:36:51 -0000 1.7
+++ TreeBidiMap.java 8 Jan 2004 22:26:08 -0000 1.8
@@ -712,11 +712,11 @@
* @param o1 the first object
* @param o2 the second object
*
- * @return negative value if o1 < o2; 0 if o1 == o2; positive
- * value if o1 > o2
+ * @return negative value if o1 < o2; 0 if o1 == o2; positive
+ * value if o1 > o2
*/
private static int compare(final Comparable o1, final Comparable o2) {
- return ((Comparable) o1).compareTo(o2);
+ return o1.compareTo(o2);
}
/**
1.11 +3 -3
jakarta-commons/collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java
Index: AbstractMapBag.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AbstractMapBag.java 2 Jan 2004 01:36:51 -0000 1.10
+++ AbstractMapBag.java 8 Jan 2004 22:26:08 -0000 1.11
@@ -196,7 +196,7 @@
Iterator it = other.uniqueSet().iterator();
while (it.hasNext()) {
Object current = it.next();
- boolean contains = getCount(current) >= ((Bag) other).getCount(current);
+ boolean contains = getCount(current) >= other.getCount(current);
result = result && contains;
}
return result;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]