IntelliJ Java IDE
The moose likes Performance and the fly likes LinkedHashSet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply locked New topic
Author

LinkedHashSet

Bob Novak
Greenhorn

Joined: Oct 25, 2001
Posts: 8
Has anyone looked at the source for LinkedHashSet - it only overrides constructors on HashSet (or so it appears) in 1.4.0_03 and in 1.4.1_01.
How does this work? (i'm trying to figure out why using the addAll(Collection)/retainAll(Collection) are not working with a collection of a class that has overridden equals and hashcode...
I'm trying to implement union and intersect on a set and want to maintain the order in which they were added...
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Please do not cross post. Continue the conversation here.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
IntelliJ Java IDE
 
subject: LinkedHashSet
 
Threads others viewed
Maps
hashcode() and equals()
LinkedHashSet question
How to print a String with out duplicates
order of elements returned by Iterator in Set
IntelliJ Java IDE