commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1683018 - in /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4: MapUtils.java MultiMap.java collection/IndexedCollection.java map/MultiValueMap.java
Date Mon, 01 Jun 2015 22:41:31 GMT
Author: tn
Date: Mon Jun  1 22:41:31 2015
New Revision: 1683018

URL: http://svn.apache.org/r1683018
Log:
Deprecate MultiValueMap and MultiMap, replaced by MultiValuedMap.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMap.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java?rev=1683018&r1=1683017&r2=1683018&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java
Mon Jun  1 22:41:31 2015
@@ -74,6 +74,7 @@ import org.apache.commons.collections4.m
  * @since 1.0
  * @version $Id$
  */
+@SuppressWarnings("deprecation")
 public class MapUtils {
 
     /**
@@ -916,7 +917,6 @@ public class MapUtils {
      *  If <code>null</code>, the text 'null' is output.
      * @throws NullPointerException if the stream is <code>null</code>
      */
-    @SuppressWarnings("deprecation")
     public static void verbosePrint(final PrintStream out, final Object label, final Map<?,
?> map) {
         verbosePrintInternal(out, label, map, new ArrayStack<Map<?, ?>>(), false);
     }
@@ -939,7 +939,6 @@ public class MapUtils {
      *   If <code>null</code>, the text 'null' is output.
      * @throws NullPointerException if the stream is <code>null</code>
      */
-    @SuppressWarnings("deprecation")
     public static void debugPrint(final PrintStream out, final Object label, final Map<?,
?> map) {
         verbosePrintInternal(out, label, map, new ArrayStack<Map<?, ?>>(), true);
     }
@@ -969,7 +968,6 @@ public class MapUtils {
      * @param debug  flag indicating whether type names should be output.
      * @throws NullPointerException if the stream is <code>null</code>
      */
-    @SuppressWarnings("deprecation")
     private static void verbosePrintInternal(final PrintStream out, final Object label, final
Map<?, ?> map,
                                              final ArrayStack<Map<?, ?>> lineage,
final boolean debug) {
         printIndent(out, lineage.size());
@@ -1440,7 +1438,9 @@ public class MapUtils {
      * @return a multi-value map backed by the given map which returns ArrayLists of values.
      * @see MultiValueMap
      * @since 3.2
+     * @deprecated since 4.1, use {@link MultiValuedMap} instead
      */
+    @Deprecated
     public static <K, V> MultiValueMap<K, V> multiValueMap(final Map<K, ?
super Collection<V>> map) {
         return MultiValueMap.<K, V>multiValueMap(map);
     }
@@ -1453,12 +1453,14 @@ public class MapUtils {
      * @param <V>  the value type
      * @param <C>  the collection class type
      * @param map  the map to decorate
-     * @param collectionClass  the type of collections to return from the map (must contain
public no-arg constructor
-     *   and extend Collection).
+     * @param collectionClass  the type of collections to return from the map
+     *   (must contain public no-arg constructor and extend Collection)
      * @return a multi-value map backed by the given map which returns collections of the
specified type
      * @see MultiValueMap
      * @since 3.2
+     * @deprecated since 4.1, use {@link MultiValuedMap} instead
      */
+    @Deprecated
     public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(final
Map<K, C> map,
             final Class<C> collectionClass) {
         return MultiValueMap.multiValueMap(map, collectionClass);
@@ -1477,7 +1479,9 @@ public class MapUtils {
      *   created by the specified collection factory
      * @see MultiValueMap
      * @since 3.2
+     * @deprecated since 4.1, use {@link MultiValuedMap} instead
      */
+    @Deprecated
     public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(final
Map<K, C> map,
             final Factory<C> collectionFactory) {
         return MultiValueMap.multiValueMap(map, collectionFactory);

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMap.java?rev=1683018&r1=1683017&r2=1683018&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMap.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MultiMap.java
Mon Jun  1 22:41:31 2015
@@ -41,7 +41,9 @@ import java.util.Collection;
  *
  * @since 2.0
  * @version $Id$
+ * @deprecated since 4.1, use {@link MultiValuedMap} instead
  */
+@Deprecated
 public interface MultiMap<K, V> extends IterableMap<K, Object> {
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java?rev=1683018&r1=1683017&r2=1683018&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/IndexedCollection.java
Mon Jun  1 22:41:31 2015
@@ -43,6 +43,8 @@ import org.apache.commons.collections4.m
  */
 public class IndexedCollection<K, C> extends AbstractCollectionDecorator<C> {
 
+    // TODO: replace with MultiValuedMap
+
     /** Serialization version */
     private static final long serialVersionUID = -5512610452568370038L;
 

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java?rev=1683018&r1=1683017&r2=1683018&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/MultiValueMap.java
Mon Jun  1 22:41:31 2015
@@ -62,7 +62,9 @@ import org.apache.commons.collections4.i
  *
  * @since 3.2
  * @version $Id$
+ * @deprecated since 4.1, use {@link org.apache.commons.collections4.MultiValuedMap MultiValuedMap}
instead
  */
+@Deprecated
 public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> implements
MultiMap<K, V>, Serializable {
 
     /** Serialization version */



Mime
View raw message