Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv30309/F:/nice/stdlib/nice/lang
Modified Files:
collections.nice java.nice
Log Message:
Removed the implementation of toArray and added retypings for enumeration.
Index: collections.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** collections.nice 29 Aug 2003 15:38:21 -0000 1.53
--- collections.nice 30 Aug 2003 23:06:07 -0000 1.54
***************
*** 391,404 ****
****************************************************************/
- <T, U | T <: U> U[] toArray(Collection<T> coll)
- {
- U[] res = cast(new U[coll.size()]);
- int i = 0;
- for (T elem : coll)
- res[i++] = elem;
-
- return res;
- }
-
<T, U> U[] mapToArray(List<T> list, T->U func)
{
--- 391,394 ----
Index: java.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** java.nice 30 Aug 2003 21:41:52 -0000 1.33
--- java.nice 30 Aug 2003 23:06:07 -0000 1.34
***************
*** 171,174 ****
--- 171,176 ----
<T> void trimToSize(Vector<T>) = native void Vector.trimToSize();
<T> void removeAllElements(Vector<T>) = native void Vector.removeAllElements();
+ <T> boolean hasMoreElements(Enumeration<T>) = native boolean Enumeration.hasMoreElements();
+ <T> T nextElement(Enumeration<T>) = native Object Enumeration.nextElement();
<T> AbstractCollection<T> AbstractCollection() = native new AbstractCollection();
***************
*** 214,217 ****
--- 216,220 ----
interface Collection<T> = native java.util.Collection;
interface Comparator<T> = native java.util.Comparator;
+ interface Enumeration<T> = native java.util.Enumeration;
interface List<T> extends Collection<T> = native java.util.List;
interface Set<T> extends Collection<T> = native java.util.Set;
|