147 |
* and will initialize itself with all its elements |
* and will initialize itself with all its elements |
148 |
* @throws NullPointerException if sortedSet is null |
* @throws NullPointerException if sortedSet is null |
149 |
*/ |
*/ |
150 |
public TreeSet(SortedSet<? extends T> sortedSet) |
public TreeSet(SortedSet<T> sortedSet) |
151 |
{ |
{ |
152 |
Iterator<T> itr; |
Iterator<T> itr; |
153 |
|
|
278 |
* @throws NullPointerException if to is null, but the comparator does not |
* @throws NullPointerException if to is null, but the comparator does not |
279 |
* tolerate null elements |
* tolerate null elements |
280 |
*/ |
*/ |
281 |
public SortedSet headSet(T to) |
public SortedSet<T> headSet(T to) |
282 |
{ |
{ |
283 |
return new TreeSet<T>(map.headMap(to)); |
return new TreeSet<T>(map.headMap(to)); |
284 |
} |
} |