harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r412270 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
Date Wed, 07 Jun 2006 03:46:30 GMT
Author: ndbeyer
Date: Tue Jun  6 20:46:30 2006
New Revision: 412270

URL: http://svn.apache.org/viewvc?rev=412270&view=rev
Log:
Generify emptyXXX methods.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java?rev=412270&r1=412269&r2=412270&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Collections.java
Tue Jun  6 20:46:30 2006
@@ -23,6 +23,7 @@
 
 /**
  * Collections contains static methods which operate on Collection classes.
+ * @since 1.2
  */
 public class Collections {
 
@@ -132,7 +133,7 @@
 		}
 	}
 
-	public static final List EMPTY_LIST = new EmptyList();
+    public static final List EMPTY_LIST = new EmptyList();
 
 	public static final Set EMPTY_SET = new EmptySet();
 
@@ -2238,26 +2239,32 @@
     }
 
     /**
-     * returns the immutable empty list
-     * 
+     * Returns a type-safe empty, immutable {@link List}.
+     * @return An empty {@link List}.
+     * @since 1.5
+     * @see #EMPTY_LIST
      */
-    public static List emptyList() {
+    public static final <T> List<T> emptyList() {
         return EMPTY_LIST;
     }
 
     /**
-     * returns the immutable empty set
-     * 
+     * Returns a type-safe empty, immutable {@link Set}.
+     * @return An empty {@link Set}.
+     * @since 1.5
+     * @see #EMPTY_SET
      */
-    public static Set emptySet() {
+    public static final <T> Set<T> emptySet() {
         return EMPTY_SET;
     }
 
     /**
-     * returns the immutable empty map
-     * 
+     * Returns a type-safe empty, immutable {@link Map}.
+     * @return An empty {@link Map}.
+     * @since 1.5
+     * @see #EMPTY_MAP
      */
-    public static Map emptyMap() {
+    public static final <K, V> Map<K, V> emptyMap() {
         return EMPTY_MAP;
     }
 



Mime
View raw message