Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv28030/stdlib/nice/lang
Modified Files:
java.nice
Log Message:
Document why contravariance is safe for unmodifiable views of collections and
maps.
Index: java.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** java.nice 19 Dec 2003 16:16:56 -0000 1.49
--- java.nice 19 Dec 2003 17:18:06 -0000 1.50
***************
*** 354,357 ****
--- 354,359 ----
<T> SortedSet<T> synchronizedSortedSet(SortedSet<T>) =
native SortedSet Collections.synchronizedSortedSet(SortedSet);
+ // Return unmodifiable views of collections and maps. It is therefore safe
+ // to lose precision on the type parameter.
<T,U | T <: U> Collection<U> unmodifiableCollection(Collection<T>) =
native Collection Collections.unmodifiableCollection(Collection);
|