• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Overloading methods w/ generics causing erasure error

 
Bobby Anderson
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before generics I had this:



So I want to change to this:


But of course with erasure both these methods now have the same signature. Is there a good way around this or am I stuck with using arrays or changing one of the method names.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50289
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about generic methods? Can you write public <T> void foo(List<T> lll) . . .?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic