posted 14 years ago
It doesn't matter if there are more than one object in one 'bucket'.
This just goes down to speed. If you have 12 objects in your Collection and they are distributed in 4 buckets, It's not really going to affect the speed.
If you have 1000000 objects distributed in 4 buckets, that's going to be a problem.
You see that a unique hashCode becomes more and more important the bigger your Collection gets.
Note that hashCode and equals work together to differentiate objects.
hashCode is the lookup for the 'bucket', equals then identifies the object you are looking for.
That means, if there are 5000000 objects in one bucket, that equals to a probable number of 5000000 iterations until the object in question was found.
JDBCSupport - An easy to use, light-weight JDBC framework -