This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Casting generic collections

 
Serch Hdez
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I've been trying to find rules for casting generic collections... is there any links about it?... thanks.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Serch Hdez:
Hi, I've been trying to find rules for casting generic collections... is there any links about it?... thanks.


What do you mean by casting a generic collection ?
 
Serch Hdez
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like


List<Integer>listI = new ArrayList<Integer>();
List<Number> listN = listI;
List<Object> listO = new ArrayList<Object>();
List<String> listS = new ArrayList<String>();
listS = (List<String> listO;
listO = listS;

Something like that, is that even possible?.. thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic