Generics error messages
- From: Roedy Green <look-on@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 31 Jul 2005 01:32:24 GMT
I wonder if anyone can shed light on what this error message means:
Name clash: The method addAll(Collection<E>) of type
SortedArrayList<E> has the same erasure as addAll(Collection<? extends
E>) of type ArrayList<E> but does not override it
SortedArrayList.java
the code looks like this:
public class SortedArrayList<E> extends ArrayList<E> implements
Cloneable {
....
public boolean addAll ( Collection<E> c )
{
sorted = false;
return super.addAll( c );
}
Is there distinction between <E> and <? extends E>?
If the underlying arrayList has a method addAll( Collection ) types
aside, why would not my method override it.?
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
.
- Follow-Ups:
- Re: Generics error messages
- From: Thomas Hawtin
- Re: Generics error messages
- From: Chris Smith
- Re: Generics error messages
- Prev by Date: Re: java.lang.ClassNotFoundException: com.pointbase.jdbc.jdbcUniversalDriver
- Next by Date: Puzzling warning message
- Previous by thread: Re: java.lang.ClassNotFoundException: com.pointbase.jdbc.jdbcUniversalDriver
- Next by thread: Re: Generics error messages
- Index(es):