commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1366801 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/
Date Sun, 29 Jul 2012 09:55:02 GMT
Author: tn
Date: Sun Jul 29 09:55:01 2012
New Revision: 1366801

URL: http://svn.apache.org/viewvc?rev=1366801&view=rev
Log:
Fix javadoc and formatting in bag package.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/HashBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedSortedBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedSortedBag.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TreeBag.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/AbstractMapBag.java
Sun Jul 29 09:55:01 2012
@@ -488,7 +488,7 @@ public abstract class AbstractMapBag<E> 
     /**
      * Write the map out using a custom routine.
      * @param out the output stream
-     * @throws IOException
+     * @throws IOException any of the usual I/O related exceptions
      */
     protected void doWriteObject(ObjectOutputStream out) throws IOException {
         out.writeInt(map.size());
@@ -503,12 +503,12 @@ public abstract class AbstractMapBag<E> 
      * Read the map in using a custom routine.
      * @param map the map to use
      * @param in the input stream
-     * @throws IOException
-     * @throws ClassNotFoundException
+     * @throws IOException any of the usual I/O related exceptions
+     * @throws ClassNotFoundException if the stream contains an object which class can not
be loaded
      * @throws ClassCastException if the stream does not contain the correct objects
      */
-    protected void doReadObject(Map<E, MutableInteger> map, ObjectInputStream in) throws
IOException,
-            ClassNotFoundException {
+    protected void doReadObject(Map<E, MutableInteger> map, ObjectInputStream in)
+            throws IOException, ClassNotFoundException {
         this.map = map;
         int entrySize = in.readInt();
         for (int i = 0; i < entrySize; i++) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/HashBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/HashBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/HashBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/HashBag.java
Sun Jul 29 09:55:01 2012
@@ -38,8 +38,7 @@ import org.apache.commons.collections.Ba
  * @since 3.0 (previously in main package v2.0)
  * @version $Id$
  */
-public class HashBag<E>
-        extends AbstractMapBag<E> implements Bag<E>, Serializable {
+public class HashBag<E> extends AbstractMapBag<E> implements Bag<E>, Serializable
{
 
     /** Serial version lock */
     private static final long serialVersionUID = -6561115435802554013L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedBag.java
Sun Jul 29 09:55:01 2012
@@ -38,8 +38,7 @@ import org.apache.commons.collections.co
  * @since 3.0
  * @version $Id$
  */
-public class PredicatedBag<E>
-        extends PredicatedCollection<E> implements Bag<E> {
+public class PredicatedBag<E> extends PredicatedCollection<E> implements Bag<E>
{
 
     /** Serialization version */
     private static final long serialVersionUID = -2575833140344736876L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedSortedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedSortedBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedSortedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/PredicatedSortedBag.java
Sun Jul 29 09:55:01 2012
@@ -37,8 +37,7 @@ import org.apache.commons.collections.So
  * @since 3.0
  * @version $Id$
  */
-public class PredicatedSortedBag<E>
-        extends PredicatedBag<E> implements SortedBag<E> {
+public class PredicatedSortedBag<E> extends PredicatedBag<E> implements SortedBag<E>
{
 
     /** Serialization version */
     private static final long serialVersionUID = 3448581314086406616L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedBag.java
Sun Jul 29 09:55:01 2012
@@ -34,8 +34,7 @@ import org.apache.commons.collections.se
  * @since 3.0
  * @version $Id$
  */
-public class SynchronizedBag<E>
-        extends SynchronizedCollection<E> implements Bag<E> {
+public class SynchronizedBag<E> extends SynchronizedCollection<E> implements
Bag<E> {
 
     /** Serialization version */
     private static final long serialVersionUID = 8084674570753837109L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java
Sun Jul 29 09:55:01 2012
@@ -33,8 +33,7 @@ import org.apache.commons.collections.So
  * @since 3.0
  * @version $Id$
  */
-public class SynchronizedSortedBag<E>
-        extends SynchronizedBag<E> implements SortedBag<E> {
+public class SynchronizedSortedBag<E> extends SynchronizedBag<E> implements SortedBag<E>
{
 
     /** Serialization version */
     private static final long serialVersionUID = 722374056718497858L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedBag.java
Sun Jul 29 09:55:01 2012
@@ -36,8 +36,7 @@ import org.apache.commons.collections.se
  * @since 3.0
  * @version $Id$
  */
-public class TransformedBag<E>
-        extends TransformedCollection<E> implements Bag<E> {
+public class TransformedBag<E> extends TransformedCollection<E> implements Bag<E>
{
 
     /** Serialization version */
     private static final long serialVersionUID = 5421170911299074185L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedSortedBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedSortedBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedSortedBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TransformedSortedBag.java
Sun Jul 29 09:55:01 2012
@@ -34,8 +34,7 @@ import org.apache.commons.collections.Tr
  * @since 3.0
  * @version $Id$
  */
-public class TransformedSortedBag<E>
-        extends TransformedBag<E> implements SortedBag<E> {
+public class TransformedSortedBag<E> extends TransformedBag<E> implements SortedBag<E>
{
 
     /** Serialization version */
     private static final long serialVersionUID = -251737742649401930L;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TreeBag.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TreeBag.java?rev=1366801&r1=1366800&r2=1366801&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TreeBag.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bag/TreeBag.java
Sun Jul 29 09:55:01 2012
@@ -77,7 +77,12 @@ public class TreeBag<E> extends Abstract
     }
 
     //-----------------------------------------------------------------------
-    // TODO: Generics - should this be E<? extends Comparable> or some such?
+    /**
+     * {@inheritDoc}
+     * 
+     * @throws IllegalArgumentException if the object to be added does not implement
+     * {@link Comparable} and the {@link TreeBag} is using natural ordering
+     */
     @Override
     public boolean add(E object) {
         if(comparator() == null && !(object instanceof Comparable)) {



Mime
View raw message