[Nice-commit] Nice/stdlib/nice/lang java.nice,1.18,1.19
Brought to you by:
bonniot
|
From: <ar...@us...> - 2003-03-27 21:38:47
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv19646/F:/nice/stdlib/nice/lang
Modified Files:
java.nice
Log Message:
Reversed last retypings of the collection and added a retyping of addAll
Index: java.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** java.nice 20 Mar 2003 21:18:51 -0000 1.18
--- java.nice 27 Mar 2003 21:38:39 -0000 1.19
***************
*** 99,119 ****
native java.util.ListIterator java.util.List.listIterator(int);
// Some methods use Object, when they should use a type variable.
! // It's in fact correct in java to use Object instead of a contravariant type.
! <E,T | E <: T> boolean contains(java.util.Collection<E>, T) =
native boolean java.util.Collection.contains(Object);
! <E,T | E <: T> boolean remove(java.util.Collection<E>, T) =
native boolean java.util.Collection.remove(Object);
! <E,T | E <: T> int indexOf(java.util.List<E>, T) =
native int java.util.List.indexOf(Object);
! <E,T | E <: T> int lastIndexOf(java.util.List<E>, T) =
native int java.util.List.lastIndexOf(Object);
! <E,T | E <: T> int lastIndexOf(java.util.Vector<E>, T, int) =
native int java.util.Vector.lastIndexOf(Object, int);
! <E,T | E <: T> boolean removeElement(java.util.Vector<E>, T) =
native boolean java.util.Vector.removeElement(Object);
! <E,T | E <: T> int search(java.util.Stack<E>, T) =
native int java.util.Stack.search(Object);
--- 99,120 ----
native java.util.ListIterator java.util.List.listIterator(int);
+ <T, U | U <: T> boolean addAll(Collection<T>, Collection<U>) =
+ native boolean java.util.Collection.addAll(java.util.Collection);
// Some methods use Object, when they should use a type variable.
! <E> boolean contains(java.util.Collection<E>, E) =
native boolean java.util.Collection.contains(Object);
! <E> boolean remove(java.util.Collection<E>, E) =
native boolean java.util.Collection.remove(Object);
! <E> int indexOf(java.util.List<E>, E) =
native int java.util.List.indexOf(Object);
! <E> int lastIndexOf(java.util.List<E>, E) =
native int java.util.List.lastIndexOf(Object);
! <E> int lastIndexOf(java.util.Vector<E>, E, int) =
native int java.util.Vector.lastIndexOf(Object, int);
! <E> boolean removeElement(java.util.Vector<E>, E) =
native boolean java.util.Vector.removeElement(Object);
! <E> int search(java.util.Stack<E>, E) =
native int java.util.Stack.search(Object);
|