Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set implemtations

 
Jeff Gaer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do the hashset and treeset classes determine uniqueness? Is it a test on the object reference, results of the equals method on the object? Is there a comparable or comparator associated with the set class? Or does one need to implement that on the objects being stored? What if there are different types of objects in the set? Good reading reference?
------------------
Thanks in advance for any help
Jeff Gaer
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It makes sense to get an overview of the Collections implementation on your way to getting into the particulars of Set classes.
Doug Lea is a major authority on Java, primarily known for his work on multi-threading. I think you'll find this link very informative.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic