Index: /luni/src/main/java/java/util/SortedSet.java =================================================================== --- /luni/src/main/java/java/util/SortedSet.java (revision 405296) +++ /luni/src/main/java/java/util/SortedSet.java (working copy) @@ -19,14 +19,14 @@ /** * SortedSet is a Set which iterates its elements in sorted order. */ -public interface SortedSet extends Set { +public interface SortedSet extends Set { /** * 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 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 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 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 tailSet(E start); } Index: /luni/src/main/java/java/util/SortedMap.java =================================================================== --- /luni/src/main/java/java/util/SortedMap.java (revision 405296) +++ /luni/src/main/java/java/util/SortedMap.java (working copy) @@ -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 extends Map { /** * 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 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 SortedMap 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 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 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 tailMap(K startKey); }