harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r405335 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util: SortedMap.java SortedSet.java
Date Tue, 09 May 2006 08:13:02 GMT
Author: tellison
Date: Tue May  9 01:12:59 2006
New Revision: 405335

URL: http://svn.apache.org/viewcvs?rev=405335&view=rev
Log:
Apply patch HARMONY-450 ([classlib][luni] Generification of Sorted collection interfaces)

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java?rev=405335&r1=405334&r2=405335&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedMap.java
Tue May  9 01:12:59 2006
@@ -19,14 +19,14 @@
 /**
  * SortedMap is a Map where the iterators sequence in order of the sorted keys.
  */
-public interface SortedMap extends Map {
+public interface SortedMap<K,V> extends Map<K,V> {
 	
 	/**
 	 * Answers the Comparator used to compare elements in this SortedMap.
 	 * 
 	 * @return a Comparator or null if the natural order is used
 	 */
-	public Comparator comparator();
+	public Comparator<? super K> comparator();
 
 	/**
 	 * Answer the first sorted key in this SortedMap.
@@ -36,7 +36,7 @@
 	 * @exception NoSuchElementException
 	 *                when this SortedMap is empty
 	 */
-	public Object firstKey();
+	public K firstKey();
 
 	/**
 	 * Answers a <code>SortedMap</code> of the specified portion of this
@@ -56,7 +56,7 @@
 	 *                when the end key is null and this SortedMap does not
 	 *                support null keys
 	 */
-	public SortedMap headMap(Object endKey);
+	public SortedMap<K,V> headMap(K endKey);
 
 	/**
 	 * Answers the last sorted key in this SortedMap.
@@ -66,7 +66,7 @@
 	 * @exception NoSuchElementException
 	 *                when this SortedMap is empty
 	 */
-	public Object lastKey();
+	public K lastKey();
 
 	/**
 	 * Answers a SortedMap of the specified portion of this SortedMap which
@@ -91,7 +91,7 @@
 	 * @exception IllegalArgumentException
 	 *                when the start key is greater than the end key
 	 */
-	public SortedMap subMap(Object startKey, Object endKey);
+	public SortedMap<K,V> subMap(K startKey, K endKey);
 
 	/**
 	 * Answers a SortedMap of the specified portion of this SortedMap which
@@ -110,5 +110,5 @@
 	 *                when the start key is null and this SortedMap does not
 	 *                support null keys
 	 */
-	public SortedMap tailMap(Object startKey);
+	public SortedMap<K,V> tailMap(K startKey);
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java?rev=405335&r1=405334&r2=405335&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/SortedSet.java
Tue May  9 01:12:59 2006
@@ -19,14 +19,14 @@
 /**
  * SortedSet is a Set which iterates its elements in sorted order.
  */
-public interface SortedSet extends Set {
+public interface SortedSet<E> extends Set<E> {
 	
 	/**
 	 * Answers the Comparator used to compare elements in this SortedSet.
 	 * 
 	 * @return a Comparator or null if the natural order is used
 	 */
-	public Comparator comparator();
+	public Comparator<? super E> comparator();
 
 	/**
 	 * Answer the first sorted element in this SortedSet.
@@ -36,7 +36,7 @@
 	 * @exception NoSuchElementException
 	 *                when this SortedSet is empty
 	 */
-	public Object first();
+	public E first();
 
 	/**
 	 * Answers a SortedSet of the specified portion of this SortedSet which
@@ -54,7 +54,7 @@
 	 *                when the end element is null and this SortedSet does not
 	 *                support null elements
 	 */
-	public SortedSet headSet(Object end);
+	public SortedSet<E> headSet(E end);
 
 	/**
 	 * Answer the last sorted element in this SortedSet.
@@ -64,7 +64,7 @@
 	 * @exception NoSuchElementException
 	 *                when this SortedSet is empty
 	 */
-	public Object last();
+	public E last();
 
 	/**
 	 * Answers a SortedSet of the specified portion of this SortedSet which
@@ -88,7 +88,7 @@
 	 * @exception IllegalArgumentException
 	 *                when the start element is greater than the end element
 	 */
-	public SortedSet subSet(Object start, Object end);
+	public SortedSet<E> subSet(E start, E end);
 
 	/**
 	 * Answers a SortedSet of the specified portion of this SortedSet which
@@ -108,5 +108,5 @@
 	 *                when the start element is null and this SortedSet does not
 	 *                support null elements
 	 */
-	public SortedSet tailSet(Object start);
+	public SortedSet<E> tailSet(E start);
 }



Mime
View raw message