commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1369931 - in /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections: keyvalue/ list/
Date Mon, 06 Aug 2012 19:21:30 GMT
Author: tn
Date: Mon Aug  6 19:21:29 2012
New Revision: 1369931

URL: http://svn.apache.org/viewvc?rev=1369931&view=rev
Log:
Checkstyle fixes.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/keyvalue/AbstractMapEntryDecorator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractListDecorator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/FixedSizeList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/LazyList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/PredicatedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SynchronizedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TransformedList.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/keyvalue/AbstractMapEntryDecorator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/keyvalue/AbstractMapEntryDecorator.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/keyvalue/AbstractMapEntryDecorator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/keyvalue/AbstractMapEntryDecorator.java
Mon Aug  6 19:21:29 2012
@@ -55,14 +55,18 @@ public abstract class AbstractMapEntryDe
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public K getKey() {
         return entry.getKey();
     }
 
+    /** {@inheritDoc} */
     public V getValue() {
         return entry.getValue();
     }
 
+    /** {@inheritDoc} */
     public V setValue(V object) {
         return entry.setValue(object);
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java
Mon Aug  6 19:21:29 2012
@@ -99,33 +99,43 @@ public abstract class AbstractLinkedList
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public int size() {
         return size;
     }
 
+    /** {@inheritDoc} */
     public boolean isEmpty() {
         return (size() == 0);
     }
 
+    /** {@inheritDoc} */
     public E get(int index) {
         Node<E> node = getNode(index, false);
         return node.getValue();
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public Iterator<E> iterator() {
         return listIterator();
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator() {
         return new LinkedListIterator<E>(this, 0);
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator(int fromIndex) {
         return new LinkedListIterator<E>(this, fromIndex);
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public int indexOf(Object value) {
         int i = 0;
         for (Node<E> node = header.next; node != header; node = node.next) {
@@ -137,6 +147,7 @@ public abstract class AbstractLinkedList
         return -1;
     }
 
+    /** {@inheritDoc} */
     public int lastIndexOf(Object value) {
         int i = size - 1;
         for (Node<E> node = header.previous; node != header; node = node.previous)
{
@@ -148,10 +159,12 @@ public abstract class AbstractLinkedList
         return -1;
     }
 
+    /** {@inheritDoc} */
     public boolean contains(Object value) {
         return indexOf(value) != -1;
     }
 
+    /** {@inheritDoc} */
     public boolean containsAll(Collection<?> coll) {
         for (Object o : coll) {
             if (!contains(o)) {
@@ -162,10 +175,13 @@ public abstract class AbstractLinkedList
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public Object[] toArray() {
         return toArray(new Object[size]);
     }
 
+    /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] array) {
         // Extend the array if needed
@@ -197,20 +213,25 @@ public abstract class AbstractLinkedList
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public boolean add(E value) {
         addLast(value);
         return true;
     }
 
+    /** {@inheritDoc} */
     public void add(int index, E value) {
         Node<E> node = getNode(index, true);
         addNodeBefore(node, value);
     }
 
+    /** {@inheritDoc} */
     public boolean addAll(Collection<? extends E> coll) {
         return addAll(size, coll);
     }
 
+    /** {@inheritDoc} */
     public boolean addAll(int index, Collection<? extends E> coll) {
         Node<E> node = getNode(index, true);
         for (E e : coll) {
@@ -220,6 +241,8 @@ public abstract class AbstractLinkedList
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public E remove(int index) {
         Node<E> node = getNode(index, false);
         E oldValue = node.getValue();
@@ -227,6 +250,7 @@ public abstract class AbstractLinkedList
         return oldValue;
     }
 
+    /** {@inheritDoc} */
     public boolean remove(Object value) {
         for (Node<E> node = header.next; node != header; node = node.next) {
             if (isEqualValue(node.getValue(), value)) {
@@ -237,6 +261,7 @@ public abstract class AbstractLinkedList
         return false;
     }
 
+    /** {@inheritDoc} */
     public boolean removeAll(Collection<?> coll) {
         boolean modified = false;
         Iterator<E> it = iterator();
@@ -250,6 +275,8 @@ public abstract class AbstractLinkedList
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public boolean retainAll(Collection<?> coll) {
         boolean modified = false;
         Iterator<E> it = iterator();
@@ -262,6 +289,7 @@ public abstract class AbstractLinkedList
         return modified;
     }
 
+    /** {@inheritDoc} */
     public E set(int index, E value) {
         Node<E> node = getNode(index, false);
         E oldValue = node.getValue();
@@ -269,11 +297,13 @@ public abstract class AbstractLinkedList
         return oldValue;
     }
 
+    /** {@inheritDoc} */
     public void clear() {
         removeAllNodes();
     }
 
     //-----------------------------------------------------------------------
+    
     public E getFirst() {
         Node<E> node = header.next;
         if (node == header) {
@@ -338,8 +368,9 @@ public abstract class AbstractLinkedList
         while (it1.hasNext() && it2.hasNext()) {
             Object o1 = it1.next();
             Object o2 = it2.next();
-            if (!(o1 == null ? o2 == null : o1.equals(o2)))
+            if (!(o1 == null ? o2 == null : o1.equals(o2))) {
                 return false;
+            }
         }
         return !(it1.hasNext() || it2.hasNext());
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractListDecorator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractListDecorator.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractListDecorator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/AbstractListDecorator.java
Mon Aug  6 19:21:29 2012
@@ -66,42 +66,53 @@ public abstract class AbstractListDecora
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public void add(int index, E object) {
         decorated().add(index, object);
     }
 
+    /** {@inheritDoc} */
     public boolean addAll(int index, Collection<? extends E> coll) {
         return decorated().addAll(index, coll);
     }
 
+    /** {@inheritDoc} */
     public E get(int index) {
         return decorated().get(index);
     }
 
+    /** {@inheritDoc} */
     public int indexOf(Object object) {
         return decorated().indexOf(object);
     }
 
+    /** {@inheritDoc} */
     public int lastIndexOf(Object object) {
         return decorated().lastIndexOf(object);
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator() {
         return decorated().listIterator();
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator(int index) {
         return decorated().listIterator(index);
     }
 
+    /** {@inheritDoc} */
     public E remove(int index) {
         return decorated().remove(index);
     }
 
+    /** {@inheritDoc} */
     public E set(int index, E object) {
         return decorated().set(index, object);
     }
 
+    /** {@inheritDoc} */
     public List<E> subList(int fromIndex, int toIndex) {
         return decorated().subList(fromIndex, toIndex);
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/CursorableLinkedList.java
Mon Aug  6 19:21:29 2012
@@ -383,6 +383,7 @@ public class CursorableLinkedList<E> ext
      * 
      * @param subList  the sublist to get an iterator for
      * @param fromIndex  the index to start from, relative to the sublist
+     * @return the list iterator for the sublist
      */
     @Override
     protected ListIterator<E> createSubListListIterator(LinkedSubList<E> subList,
int fromIndex) {
@@ -407,6 +408,7 @@ public class CursorableLinkedList<E> ext
         /**
          * Constructs a new cursor.
          * 
+         * @param parent  the parent list
          * @param index  the index to start from
          */
         protected Cursor(CursorableLinkedList<E> parent, int index) {
@@ -577,6 +579,7 @@ public class CursorableLinkedList<E> ext
         /**
          * Constructs a new cursor.
          * 
+         * @param sub  the sub list
          * @param index  the index to start from
          */
         protected SubCursor(LinkedSubList<E> sub, int index) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/FixedSizeList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/FixedSizeList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/FixedSizeList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/FixedSizeList.java
Mon Aug  6 19:21:29 2012
@@ -170,10 +170,12 @@ public class FixedSizeList<E>
         }
     }
 
+    /** {@inheritDoc} */
     public boolean isFull() {
         return true;
     }
 
+    /** {@inheritDoc} */
     public int maxSize() {
         return size();
     }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/LazyList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/LazyList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/LazyList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/LazyList.java
Mon Aug  6 19:21:29 2012
@@ -104,6 +104,7 @@ public class LazyList<E> extends Abstrac
      * placeholder that is replaced with a factory object when requested.
      * 
      * @param index  the index to retrieve
+     * @return the element at the given index
      */
     @Override
     public E get(int index) {

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/PredicatedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/PredicatedList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/PredicatedList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/PredicatedList.java
Mon Aug  6 19:21:29 2012
@@ -89,28 +89,36 @@ public class PredicatedList<E> extends P
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public E get(int index) {
         return decorated().get(index);
     }
 
+    /** {@inheritDoc} */
     public int indexOf(Object object) {
         return decorated().indexOf(object);
     }
 
+    /** {@inheritDoc} */
     public int lastIndexOf(Object object) {
         return decorated().lastIndexOf(object);
     }
 
+    /** {@inheritDoc} */
     public E remove(int index) {
         return decorated().remove(index);
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public void add(int index, E object) {
         validate(object);
         decorated().add(index, object);
     }
 
+    /** {@inheritDoc} */
     public boolean addAll(int index, Collection<? extends E> coll) {
         for (E aColl : coll) {
             validate(aColl);
@@ -118,19 +126,23 @@ public class PredicatedList<E> extends P
         return decorated().addAll(index, coll);
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator() {
         return listIterator(0);
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator(int i) {
         return new PredicatedListIterator(decorated().listIterator(i));
     }
 
+    /** {@inheritDoc} */
     public E set(int index, E object) {
         validate(object);
         return decorated().set(index, object);
     }
 
+    /** {@inheritDoc} */
     public List<E> subList(int fromIndex, int toIndex) {
         List<E> sub = decorated().subList(fromIndex, toIndex);
         return new PredicatedList<E>(sub, predicate);
@@ -141,6 +153,11 @@ public class PredicatedList<E> extends P
      */
     protected class PredicatedListIterator extends AbstractListIteratorDecorator<E>
{
         
+        /**
+         * Create a new predicated list iterator.
+         * 
+         * @param iterator  the list iterator to decorate
+         */
         protected PredicatedListIterator(ListIterator<E> iterator) {
             super(iterator);
         }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SynchronizedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SynchronizedList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SynchronizedList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/SynchronizedList.java
Mon Aug  6 19:21:29 2012
@@ -82,30 +82,36 @@ public class SynchronizedList<E> extends
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public void add(int index, E object) {
         synchronized (lock) {
             getList().add(index, object);
         }
     }
 
+    /** {@inheritDoc} */
     public boolean addAll(int index, Collection<? extends E> coll) {
         synchronized (lock) {
             return getList().addAll(index, coll);
         }
     }
 
+    /** {@inheritDoc} */
     public E get(int index) {
         synchronized (lock) {
             return getList().get(index);
         }
     }
 
+    /** {@inheritDoc} */
     public int indexOf(Object object) {
         synchronized (lock) {
             return getList().indexOf(object);
         }
     }
 
+    /** {@inheritDoc} */
     public int lastIndexOf(Object object) {
         synchronized (lock) {
             return getList().lastIndexOf(object);
@@ -134,24 +140,28 @@ public class SynchronizedList<E> extends
      *   // do stuff with iterator
      * }
      * 
+     * @param index  index of first element to be returned by this list iterator
      * @return an iterator that must be manually synchronized on the collection
      */
     public ListIterator<E> listIterator(int index) {
         return getList().listIterator(index);
     }
 
+    /** {@inheritDoc} */
     public E remove(int index) {
         synchronized (lock) {
             return getList().remove(index);
         }
     }
 
+    /** {@inheritDoc} */
     public E set(int index, E object) {
         synchronized (lock) {
             return getList().set(index, object);
         }
     }
 
+    /** {@inheritDoc} */
     public List<E> subList(int fromIndex, int toIndex) {
         synchronized (lock) {
             List<E> list = getList().subList(fromIndex, toIndex);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TransformedList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TransformedList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TransformedList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TransformedList.java
Mon Aug  6 19:21:29 2012
@@ -114,46 +114,58 @@ public class TransformedList<E> extends 
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public E get(int index) {
         return getList().get(index);
     }
 
+    /** {@inheritDoc} */
     public int indexOf(Object object) {
         return getList().indexOf(object);
     }
 
+    /** {@inheritDoc} */
     public int lastIndexOf(Object object) {
         return getList().lastIndexOf(object);
     }
 
+    /** {@inheritDoc} */
     public E remove(int index) {
         return getList().remove(index);
     }
 
     //-----------------------------------------------------------------------
+    
+    /** {@inheritDoc} */
     public void add(int index, E object) {
         object = transform(object);
         getList().add(index, object);
     }
 
+    /** {@inheritDoc} */
     public boolean addAll(int index, Collection<? extends E> coll) {
         coll = transform(coll);
         return getList().addAll(index, coll);
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator() {
         return listIterator(0);
     }
 
+    /** {@inheritDoc} */
     public ListIterator<E> listIterator(int i) {
         return new TransformedListIterator(getList().listIterator(i));
     }
 
+    /** {@inheritDoc} */
     public E set(int index, E object) {
         object = transform(object);
         return getList().set(index, object);
     }
 
+    /** {@inheritDoc} */
     public List<E> subList(int fromIndex, int toIndex) {
         List<E> sub = getList().subList(fromIndex, toIndex);
         return new TransformedList<E>(sub, transformer);
@@ -164,6 +176,11 @@ public class TransformedList<E> extends 
      */
     protected class TransformedListIterator extends AbstractListIteratorDecorator<E>
{
 
+        /**
+         * Create a new transformed list iterator.
+         * 
+         * @param iterator  the list iterator to decorate
+         */
         protected TransformedListIterator(ListIterator<E> iterator) {
             super(iterator);
         }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java?rev=1369931&r1=1369930&r2=1369931&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/list/TreeList.java
Mon Aug  6 19:21:29 2012
@@ -146,6 +146,7 @@ public class TreeList<E> extends Abstrac
     /**
      * Searches for the index of an object in the list.
      *
+     * @param object  the object to search
      * @return the index of the object, -1 if not found
      */
     @Override
@@ -160,6 +161,7 @@ public class TreeList<E> extends Abstrac
     /**
      * Searches for the presence of an object in the list.
      *
+     * @param object  the object to check
      * @return true if the object is found
      */
     @Override



Mime
View raw message