This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

wrapping to Set  RSS feed

 
sharaf navas
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
i'm having some problem in wrapping to a Set

where Box class has setter n getter methods
now how do i wrapp to a Set!


thanks in advance



 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please explain yourself a little better?

Your code examples seem unrelated to me, and I do not have a clue what you are talking about.
 
sharaf navas
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think a made a mistake there it should b a
code:

room.setCube(<must b a Set object >
not a list object
thanks
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your Box object instance has to do with your room.setCube() method invocation?
 
sharaf navas
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my code




box.setCube(new HashSet());should be a box object wrapped as set instead of new HashSet
 
sharaf navas
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi any one please help me to solve this bcoz this part is very critical for my Application any bartender help me
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid I don't know what is mean by "a Box object wrapped as a Set." Your code seems fine as posted; why does the Box object need to be a Set.

Granted you could have your Box class implement the Set interface, but I don't think that's what you are going for.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!