commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1633227 - in /commons/proper/collections/trunk/src: main/java/org/apache/commons/collections4/ main/java/org/apache/commons/collections4/multimap/ test/java/org/apache/commons/collections4/multimap/
Date Mon, 20 Oct 2014 21:00:59 GMT
Author: tn
Date: Mon Oct 20 21:00:58 2014
New Revision: 1633227

URL: http://svn.apache.org/r1633227
Log:
Fix formatting, warnings.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMap.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMapTest.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java?rev=1633227&r1=1633226&r2=1633227&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMapUtils.java
Mon Oct 20 21:00:58 2014
@@ -18,7 +18,6 @@ package org.apache.commons.collections4;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -150,7 +149,7 @@ public class MultiMapUtils {
      */
     public static <K, V> Set<V> getSet(MultiValuedMap<K, V> map, K key)
{
         if (map != null) {
-            Collection<V> col =  map.get(key);
+            Collection<V> col = map.get(key);
             if (col instanceof Set) {
                 return (Set<V>) col;
             }
@@ -184,7 +183,7 @@ public class MultiMapUtils {
     // -----------------------------------------------------------------------
 
     /**
-     * Creates a {@link ListValuedMap} with a {@link HashMap} as its internal storage.
+     * Creates a {@link ListValuedMap} with a {@link java.util.HashMap HashMap} as its internal
storage.
      *
      * @param <K> the key type
      * @param <V> the value type
@@ -195,7 +194,7 @@ public class MultiMapUtils {
     }
 
     /**
-     * Creates a {@link ListValuedMap} with a {@link HashMap} as its internal
+     * Creates a {@link ListValuedMap} with a {@link java.util.HashMap HashMap} as its internal
      * storage which maps the keys to list of type <code>listClass</code>.
      *
      * @param <K> the key type
@@ -209,7 +208,7 @@ public class MultiMapUtils {
     }
 
     /**
-     * Creates a {@link SetValuedMap} with a {@link HashMap} as its internal
+     * Creates a {@link SetValuedMap} with a {@link java.util.HashMap HashMap} as its internal
      * storage
      *
      * @param <K> the key type
@@ -221,7 +220,7 @@ public class MultiMapUtils {
     }
 
     /**
-     * Creates a {@link SetValuedMap} with a {@link HashMap} as its internal
+     * Creates a {@link SetValuedMap} with a {@link java.util.HashMap HashMap} as its internal
      * storage which maps the keys to a set of type <code>setClass</code>
      *
      * @param <K> the key type

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMap.java?rev=1633227&r1=1633226&r2=1633227&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMap.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMap.java
Mon Oct 20 21:00:58 2014
@@ -16,16 +16,22 @@
  */
 package org.apache.commons.collections4.multimap;
 
-import java.util.*;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.commons.collections4.ListValuedMap;
 import org.apache.commons.collections4.MultiValuedMap;
 import org.apache.commons.collections4.SetValuedMap;
 
 /**
- * Implements a {@link MultiValuedMap}, using a {@link LinkedHashMap} to provide data
- * storage. This MultiValuedMap implementation the allows insertion order to be
- * maintained.
+ * Implements a {@link MultiValuedMap}, using a {@link LinkedHashMap} to provide
+ * data storage. This MultiValuedMap implementation the allows insertion order
+ * to be maintained.
  * <p>
  * A <code>MultiValuedMap</code> is a Map with slightly different semantics.
  * Putting a value into the map will add the value to a Collection at that key.
@@ -43,7 +49,7 @@ import org.apache.commons.collections4.S
  * exceptions when accessed by concurrent threads without synchronization.
  *
  * @since 4.1
- * @version $Id$
+ * @version $Id: $
  */
 public class MultiValuedLinkedHashMap<K, V> extends AbstractMultiValuedMap<K, V>
implements MultiValuedMap<K, V> {
 
@@ -221,7 +227,8 @@ public class MultiValuedLinkedHashMap<K,
      */
     protected <C extends Collection<V>> MultiValuedLinkedHashMap(int initialCapacity,
float loadFactor,
             final Class<C> collectionClazz, int initialCollectionCapacity) {
-        super(new LinkedHashMap<K, Collection<V>>(initialCapacity, loadFactor),
collectionClazz, initialCollectionCapacity);
+        super(new LinkedHashMap<K, Collection<V>>(initialCapacity, loadFactor),
collectionClazz,
+                                                  initialCollectionCapacity);
     }
 
     /** Inner class for ListValuedLinkedMap */

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMapTest.java?rev=1633227&r1=1633226&r2=1633227&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMapTest.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/multimap/MultiValuedLinkedHashMapTest.java
Mon Oct 20 21:00:58 2014
@@ -16,17 +16,25 @@
  */
 package org.apache.commons.collections4.multimap;
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
 
 import junit.framework.Test;
 
-import org.apache.commons.collections4.*;
+import org.apache.commons.collections4.BulkTest;
+import org.apache.commons.collections4.ListValuedMap;
+import org.apache.commons.collections4.MapIterator;
+import org.apache.commons.collections4.MultiValuedMap;
+import org.apache.commons.collections4.SetValuedMap;
 
 /**
  * Test MultiValuedLinkedHashMap
  *
  * @since 4.1
- * @version $Id$
+ * @version $Id: $
  */
 public class MultiValuedLinkedHashMapTest<K, V> extends AbstractMultiValuedMapTest<K,
V> {
 
@@ -47,8 +55,8 @@ public class MultiValuedLinkedHashMapTes
     public void testIterationOrder() {
         MultiValuedMap<K, V> map = makeFullMap();
         MapIterator<K, V> mapIt = map.mapIterator();
-        Iterator keyIt = Arrays.asList(getSampleKeys()).iterator();
-        Iterator valueIt = Arrays.asList(getSampleValues()).iterator();
+        Iterator<K> keyIt = Arrays.asList(getSampleKeys()).iterator();
+        Iterator<V> valueIt = Arrays.asList(getSampleValues()).iterator();
 
         while(mapIt.hasNext()) {
             mapIt.next();
@@ -114,8 +122,8 @@ public class MultiValuedLinkedHashMapTes
         addSampleMappings(setMap);
 
         MapIterator<K, V> mapIt = setMap.mapIterator();
-        Iterator keyIt = Arrays.asList(getSampleKeys()).iterator();
-        Iterator valueIt = Arrays.asList(getSampleValues()).iterator();
+        Iterator<K> keyIt = Arrays.asList(getSampleKeys()).iterator();
+        Iterator<V> valueIt = Arrays.asList(getSampleValues()).iterator();
 
         while(mapIt.hasNext()) {
             mapIt.next();
@@ -190,8 +198,8 @@ public class MultiValuedLinkedHashMapTes
         addSampleMappings(listMap);
 
         MapIterator<K, V> mapIt = listMap.mapIterator();
-        Iterator keyIt = Arrays.asList(getSampleKeys()).iterator();
-        Iterator valueIt = Arrays.asList(getSampleValues()).iterator();
+        Iterator<K> keyIt = Arrays.asList(getSampleKeys()).iterator();
+        Iterator<V> valueIt = Arrays.asList(getSampleValues()).iterator();
 
         while(mapIt.hasNext()) {
             mapIt.next();



Mime
View raw message